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 ABB06F4BD for ; Tue, 26 Mar 2013 23:47:36 +0000 (UTC) Received: (qmail 82662 invoked by uid 500); 26 Mar 2013 23:47:36 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 82640 invoked by uid 500); 26 Mar 2013 23:47:36 -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 82632 invoked by uid 99); 26 Mar 2013 23:47:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 23:47:36 +0000 X-ASF-Spam-Status: No, hits=-2001.3 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; Tue, 26 Mar 2013 23:47:35 +0000 Received: (qmail 81075 invoked by uid 99); 26 Mar 2013 23:47:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Mar 2013 23:47:15 +0000 Date: Tue, 26 Mar 2013 23:47:15 +0000 (UTC) From: "Jordan Zimmerman (JIRA)" To: dev@curator.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-7) Session ids not preserved if EnsembleProvider has changed the ensemble 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-7?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614690#comment-13614690 ] Jordan Zimmerman commented on CURATOR-7: ---------------------------------------- Possible implementations (off the top of my head): HandleHolder could be changed to hold the session info. It would get assigned by ConnectionState when the session is established. ZookeeperFactory needs additional arguments for optional session info. If the HandleHolder has session info, it passes it to the ZookeeperFactory. ConnectionState would need to handle KeeperState.Expired in this case (though it may just handle it normally - you'd need to test for that). > Session ids not preserved if EnsembleProvider has changed the ensemble > ---------------------------------------------------------------------- > > Key: CURATOR-7 > URL: https://issues.apache.org/jira/browse/CURATOR-7 > Project: Apache Curator > Issue Type: Bug > Reporter: Shevek > Assignee: Jordan Zimmerman > > See https://github.com/Netflix/curator/issues/266 > InterProcessMutex, LeaderLatch, etc use an ephemeral node. If ZooKeeper gives a Disconnected event, the native client reconnects with the same session id, and the ephemeral node is preserved. If the ensemble changes at any point before a Disconnect, Curator's ConnectionState#checkState() calls handleNewConnectionString(), which constructs a new native ZK client, discarding the previous session id, and losing all locks. > This can be expensive. > Can ConnectionState be made to preserve the session id, or be more conservative about discarding the entire native client on a Disconnected event? > Clarifications: > An ensemble change (e.g. adding a new node to a cluster) does not mean that all session ids are now invalid. The next network glitch should not break locks. > There is no assumption in this description that the reconfiguration and the glitch/disconnection were related - they need not be. -- 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