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

CRDB Concurrency conflicts on unrelated data from the same table

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Unresolved
    • L3 - Default
    • None
    • 7.14.0
    • engine
    • None

    Description

      // Given
      Two process instances in the execution table

      // When
      The same operation is applied on each of the instances so that the row in the execution table is deleted (maybe it can be reproduced with updates as well). Example: Job execution that finishes the process instance.

      // Then
      A concurrency error is reported by CockroachDB that leads to a CrdbTransactionRetryException in the process engine

      // Expected
      No concurrency error is reported since the data is not related and the transactions are in any case serializable.

      Understanding:
      CockroachDB needs to ensure that the foreign key constraint is not violated after the DELETE. It does that by performing a hash join on the foreign key index with a full scan after the delete was performed (see query plans in linked CRDB forum post).

      Potentially related CockroachDB issue: https://github.com/cockroachdb/cockroach/issues/51648 (resolved in CRDB 20.1.5)
      Forum post: https://forum.cockroachlabs.com/t/understanding-a-transactionretryerror-with-a-foreign-key/3895

      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:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:

                  Salesforce