zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jordan Zimmerman <jor...@jordanzimmerman.com>
Subject Re: locking/leader election and dealing with session loss
Date Wed, 15 Jul 2015 18:19:30 GMT
Once client A loses connection it must assume that it no longer has the lock (you could try
to time the session but I think that’s a bad idea). Once you reconnect, you will know if
your session is still active or not. When done correctly, there’s no chance that both A
and B will think they own the lock at the same time.

-Jordan



On July 15, 2015 at 1:17:10 PM, Vikas Mehta (vikasmehta@gmail.com) wrote:

Thanks for the quick response Camille. If client A owns the lock, gets  
disconnected due to network partition, it will not see the SESSION_EXPIRED  
event until it is too late, i.e. client B has acquired the lock and done the  
damage. Problem here is that client cannot distinguish network partition  
from zookeeper ensemble in leader election state.  



--  
View this message in context: http://zookeeper-user.578899.n2.nabble.com/locking-leader-election-and-dealing-with-session-loss-tp7581277p7581279.html
 
Sent from the zookeeper-user mailing list archive at Nabble.com.  

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message