zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: Possibility / consequences of having multiple elected leaders
Date Thu, 08 Mar 2012 08:31:38 GMT
The whole point of the zab protocol is to ensure that only one elected leader can exist at
one time.  Since a quorum has to commit to supporting any leader there can't be two leaders.
Furthermore each change of leadership increments the epoch and that increment had to be committed
on a majority of node. That means that only one leader can exist in the latest epoch. Since
the latest epoch is, by definition, acknowledged by a majority of nodes, an old leader cannot
resurface as a pretender to the throne. 

Sent from my iPhone

On Mar 7, 2012, at 7:08 PM, Alexander Shraer <shralex@yahoo-inc.com> wrote:

> I’ve been wondering about this for a while, and suspect that this check doesn’t exist
in the code… but I may be wrong.
> From: Ted Dunning [mailto:ted.dunning@gmail.com] 
> Sent: Wednesday, March 07, 2012 4:55 PM
> To: Alexander Shraer
> Cc: user@zookeeper.apache.org
> Subject: Re: Possibility / consequences of having multiple elected leaders
> Not off the cuff and I have to run away right now.
> On Wed, Mar 7, 2012 at 4:07 PM, Alexander Shraer <shralex@yahoo-inc.com> wrote:
> > Such a commit will be rejected due to an old epoch.
> Ted, can you please point me to the place in the code where this check is performed ?
> Thanks a lot,
> Alex

  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message