You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@curator.apache.org by "Jordan Zimmerman (JIRA)" <ji...@apache.org> on 2015/09/08 20:32:46 UTC

[jira] [Commented] (CURATOR-220) LOST state is sometimes not reported to ConnectionStateListener

    [ https://issues.apache.org/jira/browse/CURATOR-220?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14735353#comment-14735353 ] 

Jordan Zimmerman commented on CURATOR-220:
------------------------------------------

Please re-test with Curator 3.0. CURATOR-247 most likely resolves this.

> LOST state is sometimes not reported to ConnectionStateListener
> ---------------------------------------------------------------
>
>                 Key: CURATOR-220
>                 URL: https://issues.apache.org/jira/browse/CURATOR-220
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 2.4.2, 2.8.0
>            Reporter: Akos Gyimesi
>
> I used iptables to drop all outgoing packets to ZooKeeper, and logged the connection state changes. Most of the time I got only CONNECTED->SUSPENDED->RECONNECTED states, even though the ZooKeeper session expired and the ephemeral nodes of the session disappeared. (I expected CONNECTED->SUSPENDED->LOST->RECONNECTED)
> According to CURATOR-185 this may not be a bug because Curator connection states are not in 1-to-1 relation with ZooKeeper connection events. However, it causes problems in the LeaderSelector recipe (and possibly in others): without the LOST event the leader will never know if it really lose leadership or not. If it does not resign leadership at the SUSPENDED event (which is recommended, but not required according to the docs) the session will be in leader state forever.
> See the following gist: https://gist.github.com/gyim/caea1b73cc8fa8f6997b
> The code tests the LeaderSelector recipe, but the behavior is the same with a simple ConnectionStateListener.
> Tested with Curator 2.4.2 and 2.8.0, it probably affects several other versions as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)