History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QUARTZ-683
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: James House
Reporter: Suneeta Puranik
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Quartz Scheduler

Error saving recovery trigger during cluster recovery for volatile jobs.

Created: 18/Jul/08 01:04 PM   Updated: 02/Aug/08 09:56 PM
Component/s: Core
Affects Version/s: 1.6
Fix Version/s: None


 Description  « Hide
1. Set org.quartz.jobStore.isClustered = true in properties file even though I am not really using clusters. Have to do this becuase there are jobs in the db which should be recovered and maintained on server restart. If this flag is not set, all entries are deleted from the db. Guess this is another issue!

2. A job with volatile flag = true is created.
3. A simple trigger for a specific time (non-repeating) with volatile flag = true is added for this job.
4. The trigger is fired, but the server is brought down before it completes execution.
5. QRTZ_FIRED_TRIGGERS table contains an entry for this incomplete trigger.
6. When the server is brought back up, JobStoreSupport$ClusterManager.manage() throws an exception "ging cluster: Failure recovering jobs: Couldn't store trigger: It does not make sense to associate a non-volatile Trigger with a volatile Job!"

Reason:
A recovery trigger is created in JobStoreSupport$ClusterManager.clusterRecover. Should it not clone the existing trigger instead? Currently it doesn't use the volatile property from the existing trigger and when it is being saved to the db, it throws the above exception.

Effect:
Can't recover a persistent job whose trigger was not completely executed before the server went down.


 All   Comments   Change History      Sort Order:
James House - [02/Aug/08 09:56 PM ]

WHen non-clustered, it is correct for all traces of volatile jobs / triggers to be deleted from the db upon restart, and to ignore the 'requests recovery' flag. Volatile == no persistence between restarts.

For the clustered case, volatile == non-volatile, because it is assumed that the cluster "always exists", so there is never a restart (from a conceptual point of view).

I've fixed the code so that during a cluster recovery, the recovery trigger created for a volatile trigger is also volatile.