Kurtt.Lin created S4-142:
----------------------------

             Summary: Deep cloning for triggers is needed upon a new PE 
instance’s creation
                 Key: S4-142
                 URL: https://issues.apache.org/jira/browse/S4-142
             Project: Apache S4
          Issue Type: Bug
    Affects Versions: 0.6
            Reporter: Kurtt.Lin
             Fix For: 0.7


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:

bq. 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to