curator-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jędrzej Dąbrowa <>
Subject ConnectionStateListener not called on lost quorum
Date Tue, 13 Sep 2016 07:15:18 GMT
I connect through Curator to an ensemble of 3 zk (testing) servers. Any
time zk connection is lost I would like to return appropriate error code to
the user instead of calling zk. I do this by monitoring connection state
with ConnectionStateListener. It works with various test scenarios, but
when 2 out of 3 servers are killed (and quorum is lost) Curator emits no
such events and the first call to ZK after quorum loss results in timeout
with org.apache.curator.CuratorConnectionLossException: KeeperErrorCode =
ConnectionLoss. Is there a possibility to get notified by Curator about
quorum loss prior to executing any call, prevent long timeout and use
fail-fast approach?

Thank you,

View raw message