Skip to content
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

SchedulerAccessor needs to catch primary key violation on reschedule (due to Quartz race condition) [SPR-17114] #21651

Closed
spring-issuemaster opened this issue Aug 1, 2018 · 0 comments
Assignees
Milestone

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Aug 1, 2018

Christian Greene opened SPR-17114 and commented

Related to #6506. While "rescheduling" a Quartz job's trigger within cluster of applications that are starting, Quartz can throw a Primary Key Violation error while trying to add a trigger that some other node in the cluster already added. A catch-and-ignore was put into ScheduleAccessor#addTriggerToScheduler to solve the #6506 error, however it only catches primary key violations when Scheduler.scheduleJob is called but doesn't cover when Scheduler.rescheduleJob is called (if the job's triggerExists).

The error causes the context to fail to load and thus the application fails to start. Can the try-catch be expanded to wrap the entire if (triggerExists) else clause?

Stack trace attached in log file.

 


Affects: 5.0.6

Reference URL: #6506

Attachments:

Issue Links:

  • #6506 SchedulerFactoryBean has race condition in Quartz cluster

Referenced from: commits ecf6c38, 7da02fb, fa97aab

Backported to: 4.3.19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.