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

    Details

    • Type: Bug Report
    • Status: Closed
    • Priority: L3 - Default
    • Resolution: Fixed
    • Affects Version/s: 7.4.0
    • Fix Version/s: 7.5.0, 7.4.2, 7.5.0-alpha1
    • Component/s: engine
    • Labels:

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: