-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.9.0-alpha3
-
None
- Configure a process engine with a job executor and history cleanup. This creates the cleanup job in the database. Have plenty of cleanable data around.
- Shutdown engine. Reconfigure cleanup job.
- Engine constructor: Job executor is started first. Assume it picks up the cleanup job immediately.
- Engine constructor: History job is reconfigured.
- If job execution finishes first, then updating the history job fails with OLE.
- Process engine constructor raises OptimisticLockingException
- Container startup fails (e.g. Tomcat)
I wasn't able to get the timing right to reproduce this locally. In the end I synchronized the execution of the `HistoryCleanupCmd` triggered by the ProcessEngineImpl constructor and the `HistoryCleanupJobHandler` using a `CountDownLatch`. With this I was able to reproduce the `OptimisticLockingException` which killed the tomcat. Although the timing is critical to trigger this bug it still can happen.