You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if this is a bug or not: I have a job that is is annotated with @DisallowConcurrentExecution, but during a particular scenario, I found that execution of that job was attempted concurrently.
Here's my scenario:
We have quartz set up on three nodes with a thread pool size of two worker threads per node. At this time I don't think the multi-node setup contributed to this issue.
During a particular event, over 200 triggers fired for job - all had the same job group, but all had different job names. Since each job instance takes multiple minutes, the vast majority of the jobs started misfiring every minute.
For some reason (not yet sure why), one of the job instances (name: 17) needed to be recovered. However, it also fired "normally" after misfiring for a few minutes on a different node.
So, job 17 started in "myGroup", then also started in the "RECOVERING_JOBS" group during the same time period. From taking a peek at the code that checks isConcurrentExectionDisallowed in the JobStoreSupport class, it appears that a second instance of a job won't be started only if the job key matches - that is, the job must have the same group and name. But in this case, the triggered job instance is in the "RECOVERING_JOBS" group, while the executing job instance is in "myGroup". Here's what the logs look like for this scenario. Notice the overlap for job name 17 starting at 16:56:57.
Is this intentional behavior? Should the original job group & name be checked instead when a job is in the recovery group and isConcurrentExectionDisallowed is true?
The text was updated successfully, but these errors were encountered:
No immediate plan/priority for it, no - this limitation has existed for about 2 decades now. PRs welcome from anyone confident about a quality solution.
Quartz version: 2.3.2
I'm not sure if this is a bug or not: I have a job that is is annotated with
@DisallowConcurrentExecution
, but during a particular scenario, I found that execution of that job was attempted concurrently.Here's my scenario:
isConcurrentExectionDisallowed
in theJobStoreSupport
class, it appears that a second instance of a job won't be started only if the job key matches - that is, the job must have the same group and name. But in this case, the triggered job instance is in the "RECOVERING_JOBS" group, while the executing job instance is in "myGroup". Here's what the logs look like for this scenario. Notice the overlap for job name 17 starting at 16:56:57.Is this intentional behavior? Should the original job group & name be checked instead when a job is in the recovery group and
isConcurrentExectionDisallowed
is true?The text was updated successfully, but these errors were encountered: