You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Robert Varga (JIRA)" <ji...@apache.org> on 2012/12/14 23:12:13 UTC
[jira] [Resolved] (ZOOKEEPER-1404) leader election pseudo code
probably incorrect
[ https://issues.apache.org/jira/browse/ZOOKEEPER-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Varga resolved ZOOKEEPER-1404.
-------------------------------------
Resolution: Fixed
Some one created duplicate issue ZOOKEEPER-1483 and that got marked fixed and this was overlooked.
> leader election pseudo code probably incorrect
> ----------------------------------------------
>
> Key: ZOOKEEPER-1404
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1404
> Project: ZooKeeper
> Issue Type: Bug
> Components: documentation
> Affects Versions: 3.4.3
> Reporter: Robert Varga
>
> The pseudo code for leader election in the recipes.html page of 3.4.3 documentation is the following...
> {quote}
> Let ELECTION be a path of choice of the application. To volunteer to be a leader:
> 1.Create znode z with path "ELECTION/guid-n_" with both SEQUENCE and EPHEMERAL flags;
> 2.Let C be the children of "ELECTION", and i be the sequence number of z;
> 3.Watch for changes on "ELECTION/guid-n_j", where j is the {color:red}*smallest*{color} sequence number such that j < i and n_j is a znode in C;
> Upon receiving a notification of znode deletion:
> 1.Let C be the new set of children of ELECTION;
> 2.If z is the smallest node in C, then execute leader procedure;
> 3.Otherwise, watch for changes on "ELECTION/guid-n_j", where j is the {color:red}*smallest*{color} sequence number such that j < i and n_j is a znode in C;
> {quote}
> I think, in both third steps *highest* should appear instead of {color:red}*smallest*{color}.
--
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