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 < [email protected]> 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
