Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-8866

Engine startup can fail with OLE when re-configuring history cleanup job

    • Icon: Bug Report Bug Report
    • Resolution: Fixed
    • Icon: L3 - Default L3 - Default
    • 7.9.0, 7.7.9, 7.8.5, 7.9.0-alpha4
    • 7.9.0-alpha3
    • engine
    • None

      1. 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.
      2. Shutdown engine. Reconfigure cleanup job.
      3. Engine constructor: Job executor is started first. Assume it picks up the cleanup job immediately.
      4. Engine constructor: History job is reconfigured.
      5. If job execution finishes first, then updating the history job fails with OLE.
      6. Process engine constructor raises OptimisticLockingException
      7. Container startup fails (e.g. Tomcat)

        This is the controller panel for Smart Panels app

            [CAM-8866] Engine startup can fail with OLE when re-configuring history cleanup job

            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.

            Sebastian Menski added a comment - 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.

              yana.vasileva Yana Vasileva
              thorben.lindhauer Thorben Lindhauer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: