Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Plain View
Zookeeper >> mail # user >> Possibility / consequences of having multiple elected leaders


+
Scott Lindner 2012-03-07, 17:48
+
Ted Dunning 2012-03-07, 18:59
+
Alexander Shraer 2012-03-08, 00:07
+
Ted Dunning 2012-03-08, 00:55
+
Alexander Shraer 2012-03-08, 03:08
+
Ted Dunning 2012-03-08, 08:31
Copy link to this message
-
RE: Possibility / consequences of having multiple elected leaders
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

+
Ted Dunning 2012-03-08, 23:12
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB