Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-997

Events that have already expired when inserted may trigger rules before expiring

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 6.1.0.Final
    • core engine
    • Hide

      Rapidly insert already expired events with a rule that logs any inserted event. There should be no logs.

      Show
      Rapidly insert already expired events with a rule that logs any inserted event. There should be no logs.
    • NEW
    • NEW

      Events that have already expired when they are inserted have their expiration times changed to the insertion time, which will not expire until the clock ticks at least once.

      Isee the following in `drools-core/src/main/java/org/drools/core/phreak/PropagationEntry.java`:

      long effectiveEnd = eventFactHandle.getEndTimestamp() + expirationOffset;
      long nextTimestamp = Math.max( insertionTime,
                                          effectiveEnd >= 0 ? effectiveEnd : Long.MAX_VALUE );
      
       if (nextTimestamp < workingMemory.getTimerService().getCurrentTime())
      

      So if current time is still insertion time, the event is not expired.

              mfusco@redhat.com Mario Fusco
              cpitman@redhat.com Christopher Pitman (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: