curator-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ding Jinqiang (JIRA)" <>
Subject [jira] [Created] (CURATOR-49) LeaderSelector has no response when delete the leader node by other clients
Date Mon, 29 Jul 2013 05:19:48 GMT
Ding Jinqiang created CURATOR-49:

             Summary: LeaderSelector has no response when delete the leader node by other
                 Key: CURATOR-49
             Project: Apache Curator
          Issue Type: Bug
          Components: Recipes
    Affects Versions: 2.1.0-incubating
         Environment: curator-recipes 2.1.0-incubating and  zookeeper 3.4.5
            Reporter: Ding Jinqiang

If I setup a normal LeaderSelection with two participants, and as expected one of them becomes
the leader. But when I delete the leader node manually by other clients, the other leaderSelector
becomes the leader normally. But the leaderSelector, which is the previous leader, does not
receive any notification in the LeaderSelectorListener. 

Well, my question is, is this normal, or I just missed something? 

Sample code may like this:

		RetryPolicy retryPolicy = new ExponentialBackoffRetry(1000, 1);
		client = CuratorFrameworkFactory.newClient(Config.getInstance().getServerConnectString(),
 		LeaderSelectorListener listener = new LeaderSelectorListener() {

			public void takeLeadership(CuratorFramework client) throws Exception {"takeLeadership, thread id:"+Thread.currentThread().getId());

			public void stateChanged(CuratorFramework client, ConnectionState newState) {"Zookeeper connection stateChanged, new state is " + newState);
		selector = new LeaderSelector(client, Config.getInstance().getEclectPath());


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message