Quantcast

leader election

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

leader election

Ishaaq Chandy
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: leader election

Ted Dunning
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 <[hidden email]> 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;"
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: leader election

changbin.liu
In reply to this post by Ishaaq Chandy
Yes, smallest -> largest
Loading...