Thanks Ted, I can see your point. We use TCP connections and we do the epoch check at the beginning of the protocol, so a message from an old leader cannot just resurface.
Alex From: Ted Dunning [mailto:[email protected]] Sent: Thursday, March 08, 2012 12:32 AM To: Alexander Shraer Cc: [email protected] Subject: Re: Possibility / consequences of having multiple elected leaders 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 <[email protected]<mailto:[email protected]>> 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:[email protected]] Sent: Wednesday, March 07, 2012 4:55 PM To: Alexander Shraer Cc: [email protected]<mailto:[email protected]> 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 <[email protected]<mailto:[email protected]>> 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
