Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-10094

Current index settings might cause DeadLocks in SQL Server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.74.0.Final
    • None
    • None
    • None
    • 2022 Week 26-28 (from Jun 27), 2022 Week 29-31 (from Jul 18)

      Under heavy stress tests, the following error has been observed 

      Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Transaction (Process ID 1649) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

      We should evaluate to include the fix in the current script we provide for SQL Server:

      The DDL script (sqlserver-jbpm-schema.sql) creates 2 indexes on EventTypes table:
      I. create index IDX_EventTypes_Id ON EventTypes(InstanceId);
      II. create index IDX_EventTypes_element ON EventTypes(element);
      It seems that the second one is completely useless, since there are only SELECTs using InstanceId, INSERTs and DELETEs (“delete from EventTypes where InstanceId=? and element=?”), while there is no PK or an index that combines both database columns (“InstanceId” and “element”).
      As per the customer, after creating a new index on both “InstanceId” and “element” the deadlocks completely disappeared. Also the performance of the delete statement was significantly improved."

       

              vmudadla@redhat.com Vani Haripriya Mudadla
              vmudadla@redhat.com Vani Haripriya Mudadla
              Antonio Fernandez Alhambra Antonio Fernandez Alhambra (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: