Open maxqch opened 1 year ago
I met the situation reverse from maxqch, created cron job, job failed and generated a simple job. whether the wrong usage of quartz or bugs?
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.
Unless anyone has fixed this, it is still relevant. We have a work-around in our application to keep us running for now, but it is a very bad user experience to have reasonable client calls result in weird internal errors. Just because nobody worked on it yet doesn't mean anything is fixed...
We have encountered the same corruption issue at our work place. It all started with a simple update to a cron schedule time that has gone and deleted the trigger. The action was to extend the time by an hour on the existing trigger. Is anyone actively looking at this. I guess the difference for our situation is we are not going from a simple to a cron trigger. We are just updating the time on an existing cron job/trigger
Using qrtz version 2.3.2, with postgres.
This occurs when a job & trigger exists, and a call is made to
scheduler.scheduleJob(job, Set.of(newTrigger), true)
wherenewTrigger
has a different type (e.g. cron vs simple) compared to the existing trigger.From what I can tell, the db query becomes an update instead of deleting from the previous table
qrtz_simple_triggers
and inserting into the new tableqrtz_cron_triggers
(in JobStoreSupport line 1222-1226). However, the trigger_type ofqrtz_triggers
is still updated fromSIMPLE
toCRON
. Any subsequent reads will cause an error because no corresponding value exists in theCRON
table.Possible solutions:
scheduleJob
throw when updating to a different type, since we probably want to userescheduleJob
Repro details
Configs
Sample test code
Exception
DB before update
DB after update