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

All timers are traversed each time a notification is created

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 7.13.2.GA
    • jBPM Core
    • None
    • False
    • None
    • False
    • ---
    • ---
    • Customer Escalated

    Description

      EjbSchedulerService only detects new timers if they are for process context:

      https://github.com/kiegroup/jbpm/blob/main/jbpm-services/jbpm-services-ejb/jbpm-services-ejb-timer/src/main/java/org/jbpm/services/ejb/timer/EjbSchedulerService.java#L270

         private boolean isNewTimer(JobContext ctx) {
             return ctx instanceof ProcessJobContext && ((ProcessJobContext) ctx).isNewTimer();
         }
      

      all efforts to avoid traverse all timers are missed in other scenarios, like creating notifications:

      TaskDeadlineJobContext

      so for a system with thousands of timers, each notification created needs to traverse all timer table for no reason

      2023-05-03 13:53:45.610 CEST [1984279] LOG:  ejecutar S_22: SELECT INFO FROM JBOSS_EJB_TIMER WHERE TIMED_OBJECT_ID=$1 and ID=$2
      2023-05-03 13:53:45.610 CEST [1984279] DETALLE:  parámetros: $1 = 'kie-server.kie-server.EJBTimerScheduler', $2 = '341b7437-996c-4d02-95ef-0ecbad902133'
      
      2023-05-03 13:53:48.318 CEST [1976775] LOG:  ejecutar S_5: SELECT INFO FROM JBOSS_EJB_TIMER WHERE TIMED_OBJECT_ID=$1 and ID=$2
      2023-05-03 13:53:48.318 CEST [1976775] DETALLE:  parámetros: $1 = 'kie-server.kie-server.EJBTimerScheduler', $2 = '687cc2c0-9899-4ecf-b82b-7df848977916'
      ...
      

      the creation of at timer should always be managed for each context

         private boolean isNewTimer(JobContext ctx) {
             return ((TimerJobContext) ctx).isNewTimer();
         }
      

      Attachments

        Activity

          People

            ftirados Francisco Javier Tirado Sarti
            afanjula@redhat.com Alberto Fanjul Alonso
            Gonzalo Muñoz Fernández Gonzalo Muñoz Fernández
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: