zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Yu <NuoNathan...@twosigma.com>
Subject RE: Clarification on ZooKeeper.getState().isAlive() and ephemeral nodes
Date Mon, 22 Feb 2016 23:00:39 GMT
Yeah, I mean the leader has expired Alice's session. Is there some time interval (some function
of session timeout) that would ensure Alice gets 'false'? 


-Nathan

-----Original Message-----
From: Flavio Junqueira [mailto:fpjunqueira@yahoo.com.INVALID] 
Sent: Monday, February 22, 2016 5:47 PM
To: user@zookeeper.apache.org
Subject: Re: Clarification on ZooKeeper.getState().isAlive() and ephemeral nodes

The ensemble leader is responsible for expiring sessions. If in step 3 you mean that the leader
has expired Alice's session, then it might be the case that Alice doesn't know yet by step
5. However, if step 3 means that Alice has already been notified of the state change, then
it will be false.

-Flavio


> On 22 Feb 2016, at 19:27, Nathan Yu <NuoNathan.Yu@twosigma.com> wrote:
> 
> Say I have two clients, Alice and Bob
> 
> 1. Alice creates ephemeral node /foo
> 2. Bob sees ephemeral node /foo
> 3. Alice's session expires.
> 4. Bob sees ephemeral /foo disappear.
> 5. Alice checks ZooKeeper.getState().isAlive()
> 
> Is there a guarantee that Alice's ZooKeeper.getState().isAlive() will always return false
 at step 5?


Mime
View raw message