You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by GIRARD-REYDET Vincent <Vi...@murex.com> on 2014/06/30 09:33:08 UTC

A question about the Fast Leader Election algorithm

Hi folks,

I've read the documentation of ZooKeeper (both scholar articles and the book), as well as some of the code. There's still an obscure question to me. How is a new election triggered? Is the reception of a request on the election port sufficient to trigger a new election?

I have constructed a sample case where a member with the most up-to-date index (let's call it A, with zxid=25 and epoch=3) thinks it is following another member (let's call it C), while B & C think they're following A - they both have zxid=12 & epoch=2. I don't understand how A is ever going to learn that it is in fact the leader. Obviously something must be wrong in my understanding. I was trying to build on the case presented in the ZooKeeper book, where A's vote for itself is received late by B...
I have tried to draw the example on the attached picture. Could someone explain me where I'm wrong and point me to the proper part of the code that handles this case?

Thanks,
Vincent
*******************************

This e-mail contains information for the intended recipient only. It may contain proprietary material or confidential information. If you are not the intended recipient you are not authorised to distribute, copy or use this e-mail or any attachment to it. Murex cannot guarantee that it is virus free and accepts no responsibility for any loss or damage arising from its use. If you have received this e-mail in error please notify immediately the sender and delete the original email received, any attachments and all copies from your system.