Uploaded image for project: 'Red Hat Process Automation Manager'
  1. Red Hat Process Automation Manager
  2. RHPAM-3503

Job execution retryDelay not honored after LoadAndScheduleRequestsTask

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.11.0.GA
    • 7.10.0.GA
    • jBPM Core
    • RHPAM 7.10.0 with org.kie.executor.interval set

    • False
    • False
    • CR1
    • +
    • Undefined
    • ---
    • ---
    • 2021 Week 10-12 (from Mar 8)

      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)
              rhn-support-mputz Martin Weiler (Inactive)
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: