SchedulerAccessor needs to catch primary key violation on reschedule (due to Quartz race condition) [SPR-17114] #21651
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
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 whenScheduler.scheduleJob
is called but doesn't cover whenScheduler.rescheduleJob
is called (if the job'striggerExists)
.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 entireif (triggerExists)
else clause?Stack trace attached in log file.
Affects: 5.0.6
Reference URL: #6506
Attachments:
Issue Links:
Referenced from: commits ecf6c38, 7da02fb, fa97aab
Backported to: 4.3.19
The text was updated successfully, but these errors were encountered: