Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.6
-
None
Description
The createPE(String id) method in ProcessingElement returns a cloned instance of the prototype. However, the way an instance's triggers map is cloned is incorrect:
pe.triggers = Maps.newHashMap(triggers);
It's a shallow cloning; every instance shares the same trigger for a certain event type.
Or, if the eventCount/lastTime in a trigger is shared across the instances by design, then checkAndUpdate() should be guarded to prevent parallel writing.