leader election recipe sample code - dispatchEvent invocations can get out of 
order
-----------------------------------------------------------------------------------

                 Key: ZOOKEEPER-1405
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1405
             Project: ZooKeeper
          Issue Type: Bug
          Components: recipes
    Affects Versions: 3.4.3
            Reporter: Robert Varga


Since the process method is not synchronized in 
org.apache.zookeeper.recipes.election.LeaderElectionSupport, therefore there is 
a race condition where events coming in from the watch may overtake the events 
dispatched during the start method. 

A solution to ensure that events dispatched during the start method are handled 
before any watch-based events is to make the process method synchronized.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to