Note that there are some explanatory texts on larger screens.

plurals
  1. POdrools-fusion not evcting events from working memory when it should
    text
    copied!<p>i have the following 2 rules:</p> <pre><code> rule "Backup Not Succeeded For At Least 3 Days" @ruleId(1) when Node($id : id) not ( Backup(clientId == $id, $state: state == BackupStateEnum.FINISHED) over window:time( 3d ) from entry-point "Backup Stream" ) then //nothing for now end rule "Prune Previous Successful Backups" @ruleId(2) when $prevBackup : Backup($id : clientId, state == BackupStateEnum.FINISHED) over window:time( 3d ) from entry-point "Backup Stream" $newerBackup : Backup(clientId == $id, state == BackupStateEnum.FINISHED, this after $prevBackup) over window:time( 3d ) from entry-point "Backup Stream" then drools.retract($prevBackup); end </code></pre> <p>and a "stress test" that generates 10K such backups per day, and simulates 50 days. given that all the above rules refer to a 3 day window, and there are no other rules in the system, there should be at most 30K events in memory after 50 days (less, since successful ones should be pruned). however, when i check the contents of the stream entry-point (a WorkingMemoryEntryPoint), i have ~380K events in memory - which means i have some very old events not being evicted automatically like they should.</p> <p>the KB was configured in stream processing mode, and an event is defined as follows:</p> <pre><code> declare Backup @role( event ) @duration ( duration ) @timestamp( finished ) end </code></pre> <p>so no explicit lifecycle management. what am i doing wrong ? i know it has something to do with rule #2 because if i remove it i get exactly 30K events in memory (10K a day * 3 day window)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload