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

Missing index on ACT_RU_EXT_TASK for foreign key constraint

    XMLWordPrintable

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.5.0, 7.4.3, 7.5.0-alpha3
    • Component/s: engine
    • Labels:

      Description

      The following index is missing and can lead to deadlocks at least on oracle 11g:

      create index ACT_IDX_EXT_TASK_EXEC on ACT_RU_EXT_TASK(EXECUTION_ID_);
      

      Test Case

      import org.camunda.bpm.engine.impl.test.PluggableProcessEngineTestCase;
      import org.camunda.bpm.model.bpmn.Bpmn;
      import org.camunda.bpm.model.bpmn.BpmnModelInstance;
      
      public class JobExecutorOracleDeadlockTest extends PluggableProcessEngineTestCase {
      
        public void test() {
          String deploymentId = repositoryService.createDeployment()
            .addModelInstance("calling.bpmn", callingProcess())
            .addModelInstance("called.bpmn", calledProcess())
            .deploy().getId();
      
          for (int i = 0; i < 25; i++) {
            runtimeService.startProcessInstanceByKey("calling");
          }
      
          assertEquals(25, managementService.createJobQuery().count());
      
          waitForJobExecutorToProcessAllJobs(1000);
      
          assertEquals(0, managementService.createJobQuery().count());
      
          repositoryService.deleteDeployment(deploymentId, true);
        }
      
        protected BpmnModelInstance callingProcess() {
          return Bpmn.createExecutableProcess("calling")
            .startEvent()
            .camundaAsyncAfter()
            .serviceTask()
              .camundaExpression("${execution.getProcessEngineServices().getRuntimeService().startProcessInstanceByKey('called')}")
            .endEvent()
            .done();
        }
      
        protected BpmnModelInstance calledProcess() {
          return Bpmn.createExecutableProcess("called")
            .startEvent()
            .camundaAsyncAfter()
            .endEvent()
            .done();
        }
      
      }
      

        Attachments

          Activity

            People

            Assignee:
            sebastian.menski Sebastian Menski
            Reporter:
            sebastian.menski Sebastian Menski
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: