Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Fix collection update during the catalog reinitialization #232

Conversation

kristiansebastian
Copy link

Re-initialize the catalog through the "Reinitialize" option (/thredds/admin/debug?catalogs/reinit) doesn't manage correctly the job and trigger scheduler, because the job and triggers are already sheduled. Example of warn and error displayed in the fc.collection.log files:

2015-10-09T11:37:24.531 +0200 WARN  - scheduler failed to add updateJob for UpdateCollection.hf_radar_ibiza-scb_codarssproc001_L1_agg. Another Job exists with that identification.
2015-10-09T11:37:24.532 +0200 ERROR - scheduleJob failed to schedule cron Job
org.quartz.ObjectAlreadyExistsException: Unable to store Trigger with name: 'hf_radar_ibiza-scb_codarssproc001_L1_agg' and group: 'rescan', because one already exists with this identification.

In order to fix this issue a new method has been implemented to reinitialize the scheduler when the DataRootHandler.reinit() is called. We haven't modified the TDM because we don't use it, and it is likely that some modification are needed.

Best regards,

Kristian

@cwardgar
Copy link
Contributor

Hi Kristian,

Have you tested this out? The Quartz Javadocs state that the scheduler cannot be restarted once it's shutdown.

Also, this change is not compatible with 5.0.0, as both DataRootHandler classes have been removed.

@JohnLCaron Any thoughts? If it were this easy to re-init collections, I think we'd have done it by now.

@kristiansebastian
Copy link
Author

Hi @cwardgar,

Yes, I have tested in my local environment and it works (the jobs are created and the collections are updated). Now, I don't know why because as you mention the scheduler shouldn't be restarted after shutdown. It is the first time that I work with the Quartz library, so you may know a better way to solve this issue.

Thanks!

@cwardgar
Copy link
Contributor

@kristiansebastian Thanks for your work on this. We've decided that this feature is better suited for version 5.0.0, where the relevant code is simpler and we can more thoroughly test it. I created an issue for it (#264) that you can watch if you'd like to follow our progress.

@cwardgar cwardgar closed this Oct 29, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants