Return-Path: X-Original-To: apmail-curator-dev-archive@minotaur.apache.org Delivered-To: apmail-curator-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C927110A6F for ; Mon, 29 Jul 2013 17:38:14 +0000 (UTC) Received: (qmail 37996 invoked by uid 500); 29 Jul 2013 17:38:13 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 37751 invoked by uid 500); 29 Jul 2013 17:38:13 -0000 Mailing-List: contact dev-help@curator.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.incubator.apache.org Delivered-To: mailing list dev@curator.incubator.apache.org Received: (qmail 37512 invoked by uid 99); 29 Jul 2013 17:38:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 17:38:12 +0000 X-ASF-Spam-Status: No, hits=-2001.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 29 Jul 2013 17:38:10 +0000 Received: (qmail 34495 invoked by uid 99); 29 Jul 2013 17:37:49 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jul 2013 17:37:49 +0000 Date: Mon, 29 Jul 2013 17:37:48 +0000 (UTC) From: "Jordan Zimmerman (JIRA)" To: dev@curator.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (CURATOR-49) LeaderSelector has no response when delete the leader node by other clients MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CURATOR-49?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jordan Zimmerman reopened CURATOR-49: ------------------------------------- Or, are you trying to test something? Please give more details. > LeaderSelector has no response when delete the leader node by other clients > --------------------------------------------------------------------------- > > Key: CURATOR-49 > URL: https://issues.apache.org/jira/browse/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(), > retryPolicy); > client.start(); > LeaderSelectorListener listener = new LeaderSelectorListener() { > @Override > public void takeLeadership(CuratorFramework client) throws Exception { > logger.info("takeLeadership, thread id:"+Thread.currentThread().getId()); > Thread.sleep(Long.MAX_VALUE); > } > @Override > public void stateChanged(CuratorFramework client, ConnectionState newState) { > logger.info("Zookeeper connection stateChanged, new state is " + newState); > } > }; > selector = new LeaderSelector(client, Config.getInstance().getEclectPath()); > selector.autoRequeue(); > selector.start(); > -- 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: http://www.atlassian.com/software/jira