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

Job execution retryDelay not honored after LoadAndScheduleRequestsTask

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.52.0.Final
    • None
    • None
    • None
    • False
    • False
    • NEW
    • NEW
    • Undefined
    • ---
    • ---

      When setting org.kie.executor.interval we see that jobs that are retried in case of an error getting scheduled immediately, instead of honoring the defined interval:

      15:13:22,157 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      15:13:32,189 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      15:13:42,213 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      15:13:52,010 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      15:13:52,238 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      15:14:02,034 INFO  [com.executor.ErrorCommand] (EE-ManagedThreadFactory-default-Thread-1)  ====== Running Job ===== 
      

      The ErrorCommand is throwing an error on purpose, number of retries is set to 5, and retryDelay to 10000. The first three executions are as expected, however after the jobs are loaded from the database, it is getting executed immediately again at 15:13:52:

      2021-03-08 15:13:42,243 DEBUG [org.jbpm.executor.impl.concurrent.ScheduleTaskTransactionSynchronization] (EE-ManagedThreadFactory-default-Thread-1) Scheduling with delay 9971 for request 14
      2021-03-08 15:13:42,243 DEBUG [org.jbpm.executor.impl.concurrent.PrioritisedScheduledThreadPoolExecutor] (EE-ManagedThreadFactory-default-Thread-1) Request job 14 has been scheduled number of jobs in the pool 1
      2021-03-08 15:13:42,243 DEBUG [org.jbpm.executor.impl.concurrent.PrioritisedScheduledThreadPoolExecutor] (EE-ManagedThreadFactory-default-Thread-1) Request job 14 has been completed number of jobs in the pool 0
      2021-03-08 15:13:42,243 DEBUG [org.jbpm.executor.impl.AvailableJobsExecutor] (EE-ManagedThreadFactory-default-Thread-1) Executor finished running job with id 14
      2021-03-08 15:13:44,012 INFO  [org.jbpm.executor.impl.concurrent.LoadAndScheduleRequestsTask] (EE-ManagedThreadFactory-default-Thread-1) Load of jobs from storage started at Mon Mar 08 15:13:44 MST 2021
      2021-03-08 15:13:44,019 INFO  [org.jbpm.executor.impl.concurrent.LoadAndScheduleRequestsTask] (EE-ManagedThreadFactory-default-Thread-1) Found 1 jobs that are waiting for execution, scheduling them...
      2021-03-08 15:13:44,019 DEBUG [org.jbpm.executor.impl.concurrent.LoadAndScheduleRequestsTask] (EE-ManagedThreadFactory-default-Thread-1) Scheduling with delay 7981 for request 14
      

      Note: the smaller the sync interval value, the easier it is to reproduce the issue.

              elguardian@gmail.com Enrique González Martínez (Inactive)
              elguardian@gmail.com Enrique González Martínez (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: