You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Ishaaq Chandy <is...@gmail.com> on 2011/03/04 01:04:48 UTC

leader election

Hi guys,

I was reading
http://hadoop.apache.org/zookeeper/docs/current/recipes.html#N102D0 and am
wondering if the instructions there are slightly wrong.

Step 3 of the first phase (creation of the znode) says:

"Watch for changes on "ELECTION/n_j", where j is the smallest sequence
number such that j < i and n_j is a znode in C;"

Wouldn't this cause the herd effect? Shouldn't this be:

"Watch for changes on "ELECTION/n_j", where j is the largest sequence number
such that j < i and n_j is a znode in C;"

Regards,
Ishaaq

Re: leader election

Posted by Ted Dunning <te...@gmail.com>.
To help people who see differences as slowly as I do, the change suggested
is to change smallest to largest.

Clearly the smallest j is the oldest one and Ishaaq does seem to have found
an error in the statement of the algorithm.

On Thu, Mar 3, 2011 at 4:04 PM, Ishaaq Chandy <is...@gmail.com> wrote:

> Step 3 of the first phase (creation of the znode) says:
>
> "Watch for changes on "ELECTION/n_j", where j is the smallest sequence
> number such that j < i and n_j is a znode in C;"
>
> Wouldn't this cause the herd effect? Shouldn't this be:
>
> "Watch for changes on "ELECTION/n_j", where j is the largest sequence
> number
> such that j < i and n_j is a znode in C;"
>

Re: leader election

Posted by "changbin.liu" <ch...@gmail.com>.
Yes, smallest -> largest

--
View this message in context: http://zookeeper-user.578899.n2.nabble.com/leader-election-tp6086870p6533302.html
Sent from the zookeeper-user mailing list archive at Nabble.com.