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

Job acquisition thread does not become idle when no jobs are there

XMLWordPrintable

      The job acquisition thread is notified whenever a job is added. It maintains a flag isJobAdded for that. That flag is only cleared when the acquisition thread has actually slept (a remain of the previous implementation, cf https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/AcquireJobsRunnable.java#L51). If the job notification is made when the acquisition thread is not already sleeping, it will infinitely assume that a job was added and therefore infinitely maintain idle level 0 (cf https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/BackoffJobAcquisitionStrategy.java#L198).

      Solution idea:
      Clear the flag on every acquisition cycle (e.g. after the strategy was reconfigured, https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/impl/jobexecutor/SequentialJobAcquisitionRunnable.java#L68)

      Workaround:
      https://github.com/ThorbenLindhauer/CAM-5073-workaround

        This is the controller panel for Smart Panels app

              smirnov Roman Smirnov
              thorben.lindhauer Thorben Lindhauer
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: