Closed Gavrilov-Ivan closed 2 weeks ago
Changes:
RunningJobsCache
:
invalidate(JobKey)
- invalidate all running triggers for provided job keyinvalidateAll()
- invalidate entire cacheRunningJobCache
(jmix.quartz:type=RunningJobsCache
)RunningJobsCache
- jmix.quartz.running-jobs-cache-usage-enabled
. True by default.For QA:
@DisallowConcurrentExecution
annotationTested on: Jmix version: 2.3.999-SNAPSHOT Jmix Studio plugin version: 2.3.SNAPSHOT6580-241 IntelliJ version: IntelliJ IDEA 2024.1.4 (Community Edition)
Two class jobs, with the @DisallowConcurrentExecution annotation and without the one. Two triggers for each jobs. Make crossing triggers. There is no Paused status in the automatic mode of jobs - Ok.
If two triggers are identical in start/end for the job with @DisallowConcurrentExecution, they run the job one after the other, there is doubling the job time.
Environment
Jmix version: 2.3
Bug Description
https://forum.jmix.io/t/joblistener-quartz-jobexecutionlistener-threw-exception/5130
There are two issues in this
RunningJobsCache
that occur with some cache implementation like Hazelcast or Redis (but works with default one):RunningTriggersWrapper
- cache value that is used for accumulation of currently running triggers - is not Serializable. That causes runtime issue.RunningTriggersWrapper
is not properly put back to the cache. Because of that job status doesn't change in UI.Additional suggested changes:
Steps To Reproduce
Steps to reproduce the behavior.
Current Behavior
Runtime exception with serialization issue. UI not reflecting state changes (visible after fix of serialization issue)
Expected Behavior
Cache should work properly with different cache implementations.