]
Mark Proctor updated JBRULES-3583:
----------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
Retracting an event with an explicit expiration results in memory
leak
----------------------------------------------------------------------
Key: JBRULES-3583
URL:
https://issues.jboss.org/browse/JBRULES-3583
Project: Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: drools-core
Affects Versions: 5.4.0.Final
Environment: Windows 7, Java 1.6
Reporter: Ladd Asper
Assignee: Edson Tirelli
Labels: expiration, leak, memory, retract
package drools.tests
import drools.tests.MyEvent
import java.util.List
declare MyEvent @role(event) @expires(14d) end // <====== leaks
//declare MyEvent @role(event) end // <====== doesn't leak
rule "UpdateAndRetractOldEvents"
salience 10000
when
$old : MyEvent( $key : key )
MyEvent( key == $key, this after $old )
then
retract( $old );
System.err.println( "retracted $old" );
end
My test case is a loop that does this:
MyEvent firstA = new MyEvent( "first", "firstA" ); // key, value
MyEvent firstB = new MyEvent( "first", "firstB" ); // key, value
...
ksession.insert( firstA );
ksession.fireAllRules();
Thread.sleep( 50 );
ksession.insert( firstB );
ksession.fireAllRules();
Memory consumption stays flat if MyEvent is declared without an expiration time. Memory
consumption increases linearly if MyEvent is declared with an expiration time.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: