NCEAS / metadig-engine

MetaDig Engine: multi-dialect metadata assessment engine
7 stars 5 forks source link

metadig-scheduler jobs are overlapping #292

Closed gothub closed 2 years ago

gothub commented 2 years ago

The metadig-scheduler, which harvests newly added pids from MNs for assessment, appears to be experiencing overlapping jobs. Java Quartz is used for the scheduling, and is supposed to not schedule a new version of a job if one is currently running, but it appears that it is.

Check JobScheduler.java and RequestReportJob.java and the version of Quartz that is being used to determine if Quartz is the cause, or some other problem is occuring.

gothub commented 2 years ago

Upgrading Quartz to v2.1.7 has resolved the problem. No source code changes were required, as the class RequestReportJob already had the required annotations e.g.:

@PersistJobDataAfterExecution
@DisallowConcurrentExecution
public class RequestReportJob implements Job {

this prevents concurrent executions of uniquely named jobs (taskname + taskGroup, i.e. 'quality-dataone-fair' + 'metadig').

Fixed in commit 0b19781e65a234bd264673b12e663d6c23b6dd88