Bug 996024 - EntryPoint still contains FactHandle of a fact that should have expired
EntryPoint still contains FactHandle of a fact that should have expired
Status: CLOSED CURRENTRELEASE
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity high
: ER3
: 6.0.0
Assigned To: Edson Tirelli
Marek Winkler
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-12 05:00 EDT by Marek Winkler
Modified: 2014-08-06 16:16 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:16:59 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Reproducer test case - java (3.25 KB, text/x-java)
2013-08-12 05:00 EDT, Marek Winkler
no flags Details
Reproducer test case - DRL (326 bytes, text/plain)
2013-08-12 05:01 EDT, Marek Winkler
no flags Details
Reproducer test case - java (3.24 KB, text/x-java)
2013-08-12 05:03 EDT, Marek Winkler
no flags Details

  None (edit)
Description Marek Winkler 2013-08-12 05:00:38 EDT
Created attachment 785615 [details]
Reproducer test case - java

Description of problem:

After an event expires, the EntryPoint still contains reference to its FactHandle. Consider an event that should expire after 4 seconds:

        FactHandle handle = entryPoint.insert(event);
        assertTrue(entryPoint.getFactHandles().contains(handle));
        kieSession.fireAllRules();

        assertTrue(entryPoint.getFactHandles().contains(handle));

        advanceTime(5, TimeUnit.SECONDS);
        kieSession.fireAllRules();

        // the following assertion fails
        assertFalse(entryPoint.getFactHandles().contains(handle));


As this test passed for 6.0.0.Beta4, is there a chance that this test should be changed for Phreak?

Version-Release number of selected component (if applicable):

Drools 6.0.0-SNAPSHOT
Drools 6.0.0.CR1

This worked in Drools 6.0.0.Beta4.

How reproducible:

Please run the attached reproducer.

Actual results:

The last assertion fails.

Expected results:

The test passes.
Comment 1 Marek Winkler 2013-08-12 05:01:23 EDT
Created attachment 785616 [details]
Reproducer test case - DRL
Comment 2 Marek Winkler 2013-08-12 05:03:33 EDT
Created attachment 785617 [details]
Reproducer test case - java
Comment 3 Edson Tirelli 2013-08-30 18:37:55 EDT
The test case was not setting the event processing mode to STREAM:

.setEventProcessingMode(EventProcessingOption.STREAM)

Automatic garbage collection only happens in STREAM mode.

Test case added to the codebase anyway:

http://github.com/droolsjbpm/drools/commit/65fad8a4f
Comment 7 Marek Winkler 2013-10-11 11:14:14 EDT
Verified on BRMS 6.0.0.ER3.

Note You need to log in before you can comment on or make changes to this bug.