curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chao chu <>
Subject Re: Leader Latch recovery after suspended state
Date Mon, 10 Mar 2014 16:06:36 GMT
Just in case anyone interested in this conversion might miss an important
fact not explicitly mentioned here: any EPHEMERAL nodes will be deleted on
session expire (guaranteed by ZK). This makes the 'fact' I mentioned above
reliable, I guess.

On Tue, Mar 11, 2014 at 12:00 AM, chao chu <> wrote:

> Um, just my personal thoughts. As I understand, I think we are relying on
> the fact that: at any time, the latch who created the lowerest number znode
> on the leader election node path is determinted as the leader (this is
> exactly how the checkLeadership identify the current leader).
> Otherwise, at least for LeaderLatch, we lose the advantage to have the
> distinguish between ConnectionLossException and SessionExpiredExpection.
> On Mon, Mar 10, 2014 at 11:44 PM, Jordan Zimmerman <
>> wrote:
>>  Sorry for being dense here, but my point is that: Suppose the leader
>> latch does NOT setLeadership(false) on receiving SUSPENDED, then what you
>> mentioned below won't happen, right?
>> If the latch does't set false then it is lying. When there is a network
>> partition it is impossible to know the state of the cluster. The only safe
>> thing to do is assume that you are no longer leader (no longer hold the
>> lock, etc.).
>> -JZ
> --
> ChuChao


View raw message