Scenario: <div>5.4.0, STREAM, fireUntilHalt() run in separate thread, AlertEvent events inserted every 1 or two seconds.</div><div><div><br></div></div><div>The following rule should add the oldest AlertEvent that hasn't been associated with an AlertCluster</div>
<div>to an AlertCluster and store the cluster reference in AlertEvent.cluster and add an AlertEvent</div><div>reference to the cluster's list:</div><div><br></div><div><div>rule "extend AlertCluster"</div><div>
when</div><div> $alertEvent: AlertEvent( cluster == null ) from entry-point "Cluster Stream"</div><div> not( AlertEvent( cluster == null, this before $alertEvent ) from entry-point "Cluster Stream" )</div>
<div> $cluster: AlertCluster( eval( $cluster.closeEnough( $alertEvent ) ) )</div><div>then</div><div> modify( $cluster ){</div><div> addAlertEvent( $alertEvent ) // add AlertEvent to AlertCluster's list</div>
<div> } </div><div> modify( $alertEvent ){</div><div> setCluster( $cluster ) // store reference to containing AlertCluster</div><div> }</div><div>end</div></div><div><br></div><div>In spite of the constraint "cluster == null" and using modify for updating the AlertEvent, the rule</div>
<div>fires repeatedly. Even adding "no-loop true" does not avoid this. (A redundant constraint</div><div>testing for the non-occurrence of the AlertEvent in the AlertCluster's List alertEvent</div><div><br></div>
<div>The rule executes perfectly well with 5.3.0.</div><div><br></div><div>I'm aware of Edson's note indicating some synchronization bug in 5.4.0, but it's hard to imagine</div><div>how a lack of synchronization can be responsible for a problem when inserts occur at a very</div>
<div>low-rate.</div><div><br></div><div><br></div>