Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-4881

Dispatch Executor Must Limit Concurrent Execution of Particular Trigger

    Details

      Description

      If trigger is configured as repeatable with period that might be shorter than actual execution time, there should be way for user to configure if:

      • concurrent execution is allowed
      • concurrent execution is not permitted

      Of course only one boolean flag is enough to support this feature.

       

      Needed:

      • dispatchTrigger entity should be updated with overlapAllowed attribute
      • interface or listener design should be updated to control executors - either executor should not be called from listener, or base executor should be involved which would make sure that execution respects overlapAllowed attribute
      • DispatchLog must show event (introduce SKIPPED enumeration)

      Prefered:

      • overlapAllowed check should not be implemented in Listener as it is not responsibility of listener
      • involve OOP techniques to get to right solution and separate listener - overlapAllowedControler - executor responsibilities

      Integration Test

      • test must create simple executor implementation that updates shared counter (countUpLatch or something similar) sleeps 5 seconds
      • create trigger with period of 3 seconds and activate test executor
      • after 7seconds deactivate trigger and verify sharedCounter value (or Latch)
      • depending on overlapAllowed counter will be 1 or 2

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              matija.petanjek Matija Petanjek
              Reporter:
              igor.beslic Igor Beslic
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.3.X