You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Multiple triggers for a single job detail execute concurrently for a job annotated with @DisallowConcurrentExecution when the triggers are scheduled for the same time and the scheduler is in a cluster.
Expected behavior
The job will not execute concurrently across the cluster
Cluster Host 1
2023-02-01 15:27:42 INFO [com.tst.MyJob]] (MyJob_Worker-1) start
Darwin cab-wsm-0279148 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
Output of java -version
openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08) OpenJDK 64-Bit Server VM GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2
Build tool (ie. output of mvnw --version or gradlew --version)
org.quartz.DisallowConcurrentExecution has no effect if used on a bean class that declares a @Scheduled method; it's a Quartz-specific annotation that needs to be used to annotate a org.quartz.Job implementation class. You would need to use a custom job class (annotated with @DisallowConcurrentExecution) and schedule it programmatically.
Also note that concurrentExecution = Scheduled.ConcurrentExecution.SKIP will not work across the cluster either.
@mkouba
is it planned to modification for the annotation Scheduled in order to achieve similar behavior with the custom job class (annotatedwith @DisallowConcurrentExecution)?
@mkouba is it planned to modification for the annotation Scheduled in order to achieve similar behavior with the custom job class (annotatedwith @DisallowConcurrentExecution)?
It might be implemented in the context of #26062. But there is no plan so far.
Describe the bug
Multiple triggers for a single job detail execute concurrently for a job annotated with @DisallowConcurrentExecution when the triggers are scheduled for the same time and the scheduler is in a cluster.
Expected behavior
The job will not execute concurrently across the cluster
Cluster Host 1
Cluster Host 2
nothing
database
Actual behavior
The job will execute concurrently across the cluster
Cluster Host 1
Cluster Host 2
database
How to Reproduce?
Job class
Quartz configuration
Output of
uname -a
orver
Darwin cab-wsm-0279148 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:08:47 PST 2022; root:xnu-8792.61.2~4/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.12" 2021-07-20 OpenJDK Runtime Environment GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08) OpenJDK 64-Bit Server VM GraalVM CE 21.2.0 (build 11.0.12+6-jvmci-21.2-b08, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.11.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.8.1
Additional information
old issue is ignored
The text was updated successfully, but these errors were encountered: