[rules-users] Garbage collection and sliding windows (Drools 5.5.0 Final)

tai-atari p00temkin at gmail.com
Sat Feb 9 15:29:28 EST 2013


Hi cusmaimatteo and thanks for your quick reply. 

The drl file loaded is really simple (see below), so there should not be any
additional rule dependencies. 

<code>
package com.droolstest
import com.droolstest.AnEvent;
dialect "java"

declare AnEvent
    @role( event )
end

rule "Event print"
when
	AnEvent( $src : source) over window:time(10s) from entry-point
"TheEventStream"
then
	System.out.println("---------> Received AnEvent from " + $src);
end
</code>

I even tried to marshall the ksession to disk as described in the Drools
Developers Cookbook. This also showed that the expired events are still
being written to the ksession.info file which just keeps growing over time.
Unmarshalling just puts me back into the same state. 

For the above entry-point ("TheEventStream"), I verify the number of
remaining items using

<code>
WorkingMemoryEntryPoint eventStream = (WorkingMemoryEntryPoint)
ksession.getWorkingMemoryEntryPoint( "TheEventStream");
System.out.println("current event count " + ": " +
eventStream.getFactCount());
</code>

which shows that this event count is increasing/decreasing properly over
time. During bursts its value shows thousands of events, and after silence
for 10 seconds it goes down to 0. So everything seems fine unless I profile
the application and run it live with high throughput. 

Am I missing some configuration option available for ksession to make
expired events available to the GC?




--
View this message in context: http://drools.46999.n3.nabble.com/Garbage-collection-and-sliding-windows-Drools-5-5-0-Final-tp4022183p4022185.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list