Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.3
-
None
-
None
Description
The pseudo code for leader election in the recipes.html page of 3.4.3 documentation is the following...
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 smallest 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 smallest sequence number such that j < i and n_j is a znode in C;
I think, in both third steps highest should appear instead of smallest.
Attachments
Issue Links
- is duplicated by
-
ZOOKEEPER-1483 Fix leader election recipe documentation
- Resolved