hadoop-zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vinod Johnson <Thomas.John...@Sun.COM>
Subject Re: Simpler ZooKeeper event interface....
Date Wed, 07 Jan 2009 16:24:38 GMT
Hiram Chirino wrote:
> Knowing about a disconnection may be important to some apps.  For
> example if an app uses ZK for leader election, and the leader gets
> disconnected from ZK, he should give up being the leader, since a
> different leader may get elected while he is disconnected from ZK.
>
>   
Is that necessarily true?

My assumption is the following - if I'm connected to multiple ZK 
servers, then assuming the leader election recipe given in the docs, the 
leader needs to only demote itself if its session expires. Of course, 
doing the same on disconnect does not violate safety, it just seems too 
pessimistic. In the case of followers, a disconnected event would mean 
that they will have to wait for reconnection before being able to 
determine if one of them should in fact be the leader.

Mime
View raw message