-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@DisallowConcurrentExecution jobs with multiple triggers running concurrently #674
Comments
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
We've been experiencing the same issue. Is there any update on this issue now, given the project seems to be active again? |
still occurs, a single job detail annotated with @DisallowConcurrentExecution, three or more triggers referencing this job detail entry, and call triggerJob method at the same time, sometimes, this job just run once or twice, the remaining triggers BLOCKED forever in the table qrtz_triggers, no one set their state to WAITING or other state. It looks like there is something wrong with the state machine. quartz version 2.3.2. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
This is still a problem |
Indeed, I can confirm this is still an issue. And from my investigations it's caused by this: 3f65b28. |
Encountered relevant problem, here is my scenario, |
Multiple triggers for a single job detail execute concurrently for a job annotated with
@DisallowConcurrentExecution
when the triggers are scheduled for the same time and the scheduler is in a cluster.Expected behaviour
The job will not execute concurrently across the cluster
Actual behaviour
The job will execute concurrently across the cluster
Scenario
We have a single Quartz job that has multiple triggers associated with it in a clustered environment. The job is non-concurrent and annotated with
@DisallowConcurrentExecution
. Additionally, there is only a single job detail entry associated with this job.We have multiple Quartz triggers referencing this job detail entry in order to provide different parameters to the job based on user-defined values via the Trigger parameters.
Some of these triggers are scheduled for exactly the same time. In this scenario I'd expect that only a single trigger for the job would run at any given time across the cluster, but we're seeing each member of the cluster pick up a different trigger for the same non-concurrent job detail entry.
If there is a ~1 minute difference between the start times, everything works as expected - the cluster waits for the previous job to finish before attempting to start the second.
Analysis
I've investigated into the issue, and it appears that the cluster ignores the BLOCKED state of the trigger. I've added some log statements using a debuggers "Evaluation on Breakpoint" feature (StdJDBCDelegate line 1522):
Cluster Host 1
Cluster Host 2
Details
Quartz Properties:
QRTZ_JOB_DETAILS table:
QRTZ_CRON_TRIGGERS table:
The text was updated successfully, but these errors were encountered: