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&#39;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&#39;s list:</div><div><br></div><div><div>rule &quot;extend AlertCluster&quot;</div><div>
when</div><div>    $alertEvent: AlertEvent( cluster == null ) from entry-point &quot;Cluster Stream&quot;</div><div>    not( AlertEvent( cluster == null, this before $alertEvent ) from entry-point &quot;Cluster Stream&quot; )</div>
<div>    $cluster: AlertCluster( eval( $cluster.closeEnough( $alertEvent ) ) )</div><div>then</div><div>    modify( $cluster ){</div><div>        addAlertEvent( $alertEvent ) // add AlertEvent to AlertCluster&#39;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 &quot;cluster == null&quot; and using modify for updating the AlertEvent, the rule</div>
<div>fires repeatedly. Even adding &quot;no-loop true&quot; does not avoid this. (A redundant constraint</div><div>testing for the non-occurrence of the AlertEvent in the AlertCluster&#39;s List alertEvent</div><div><br></div>
<div>The rule executes perfectly well with 5.3.0.</div><div><br></div><div>I&#39;m aware of Edson&#39;s note indicating some synchronization bug in 5.4.0, but it&#39;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>