hapifhir / hapi-fhir

🔥 HAPI FHIR - Java API for HL7 FHIR Clients and Servers
http://hapifhir.io
Apache License 2.0
1.94k stars 1.3k forks source link

Scheduler ID problems with multiple instances. #6007

Closed tadgh closed 1 week ago

tadgh commented 2 weeks ago

Current logic sets the scheduler NAME to a unique value, by appending an auto-incrememented ID as a suffix on the name. See https://github.com/hapifhir/hapi-fhir/blob/7e2551525a015c7e50536dd477e57e11292a5f29/hapi-fhir-jpa/src/main/java/ca/uhn/fhir/jpa/sched/BaseHapiScheduler.java#L105-L105

As per the quartz docs:

Per the Quartz Docs:

org.quartz.scheduler.instanceName - Can be any string, and the value has no meaning to the scheduler itself - but rather serves as a mechanism for client code to distinguish schedulers when multiple instances are used within the same program. If you are using the clustering features, you must use the same name for every instance in the cluster that is ‘logically’ the same Scheduler.

org.quartz.scheduler.instanceId - Can be any string, but must be unique for all schedulers working as if they are the same ‘logical’ Scheduler within a cluster.

recommend removing the id from the name.