[
https://issues.jboss.org/browse/DROOLS-997?page=com.atlassian.jira.plugin...
]
Edson Tirelli commented on DROOLS-997:
--------------------------------------
[~cpitman] the engine doesn't have enough information to know if an expired event is
expected do be dropped (because it is no longer relevant on the use case) or processed to
avoid the loss of events (due, for instance, to a network delay, or a server down, etc).
Please note that we are talking about millisecond time resolution here. It is
"easy" to understand the use case of "the event is three hours late",
but what if the event is 1ms late? Should the engine process it or not?
The only possible deterministic behaviour is to process all incoming events, and match
them once before expiring.
If on a given deployment, events should be dropped after an arbitrary timespan (for
instance, if they are more than 10 seconds late, or more than 1 hour late, etc), then the
recommended approach is to simply filter out such events before reaching the engine.
Events that have already expired when inserted may trigger rules
before expiring
--------------------------------------------------------------------------------
Key: DROOLS-997
URL:
https://issues.jboss.org/browse/DROOLS-997
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 6.1.0.Final
Environment: BRMS CEP 6.1.3 GA
Reporter: Chris Pitman
Assignee: Mario Fusco
Labels: fusion
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`:
{code:java}
long effectiveEnd = eventFactHandle.getEndTimestamp() + expirationOffset;
long nextTimestamp = Math.max( insertionTime,
effectiveEnd >= 0 ? effectiveEnd : Long.MAX_VALUE
);
if (nextTimestamp < workingMemory.getTimerService().getCurrentTime())
{code}
So if current time is still insertion time, the event is not expired.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)