curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cameron McKenzie <>
Subject Leader latch issue?
Date Wed, 28 May 2014 22:57:42 GMT
I'm having a small issue with the LeaderLatch recipe, which I can probably
work around, but I thought I'd check if it's considered an issue worth

If we start a LeaderLatch and no connection to ZooKeeper is available, then
when a connection does become available to ZooKeeper, the latch does not
start. This is because in the handleStateChange() method, it only resets
the latch state on RECONNECTED, not on CONNECTED.

So, the latch can recover from connection loss if it's previously had a
connection, but not if it's never had a connection.

I presume this would simply be a case of changing the handleStateChange()
method to handle the CONNECTED case as well. I've had a quick look and I
don't think this would have any side effects.

I'm happy to fix the issue if this is considered a reasonable solution.

View raw message