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

Failing dabase batch operation can lead to inconsistent database state

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.12.0, 7.9.14, 7.10.8, 7.11.2, 7.12.0-alpha2
    • 7.10.0, 7.11.0, 7.12.0
    • engine
    • None
    • JDK 8, Microsoft SQL Server 2014

    Description

      Given:

      • the skipHistoryOptimisticLockingExceptions configuration flag is set to (the default value) true in order to suppress OptimisticLockingExceptions for Historic Entities
      • JDBC batch processing is used

      When:

      • Two jobs are executed in concurrent transactions
      • Both jobs try to create the same process variable (runtime)
      • In one of the transactions this causes a constraint violation, which the engine treats as an optimistic locking case, because it indicates a problem with parallel modification
      • The engine tries to determine if it should throw OptimisticLockingException or not (taking skipHistoryOptimisticLockingExceptions into account)

      Then:

      • OptimisticLockingException is incorrectly not thrown.
      • The remainder of the JDBC batch is not retried
      • The rest of the database flush continues.
      • The transaction commits
      • The jobs are not removed from the database, leading to an inconsistency in database state

      Expected:

      • OptimisticLockingException is thrown and the transaction rolls back
      • This requires hasOptimisticLockingException method (determines the failed db operation) to return the correct failing operation in case of JDBC batching

      Hints (optional):

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                nikola.koevski Nikola Koevski
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce