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 A5105F0B4 for ; Wed, 5 Nov 2014 05:19:34 +0000 (UTC) Received: (qmail 26138 invoked by uid 500); 5 Nov 2014 05:19:34 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 26065 invoked by uid 500); 5 Nov 2014 05:19:34 -0000 Mailing-List: contact dev-help@curator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@curator.apache.org Delivered-To: mailing list dev@curator.apache.org Received: (qmail 25843 invoked by uid 99); 5 Nov 2014 05:19:34 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Nov 2014 05:19:34 +0000 Date: Wed, 5 Nov 2014 05:19:34 +0000 (UTC) From: "Scott Blum (JIRA)" To: dev@curator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CURATOR-136) Invalid LeaderLatch path never errors MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CURATOR-136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14197632#comment-14197632 ] Scott Blum commented on CURATOR-136: ------------------------------------ Should we rename the title of this jira? I just integrated 2.7.0 to our internal code base, and several things broke due to stricter enforcement of paths. The release notes (https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12314425&version=12327442) basically don't even hint about this as an upgrade issue. Would changing this jira title change how the release notes are presented? > Invalid LeaderLatch path never errors > ------------------------------------- > > Key: CURATOR-136 > URL: https://issues.apache.org/jira/browse/CURATOR-136 > Project: Apache Curator > Issue Type: Bug > Components: Recipes > Affects Versions: 2.6.0 > Reporter: John Vines > Assignee: Jordan Zimmerman > Fix For: 2.7.0 > > > I was messing with the LeaderLatch and I noticed some ill behavior for the pathing of it. Given the following code- > {code} public static void main(String args[]) throws Exception { > TestingServer ts = new TestingServer(); > CuratorFramework curator = CuratorFrameworkFactory.builder().connectString(ts.getConnectString()).retryPolicy(new ExponentialBackoffRetry(1000, 5)).build(); > curator.start(); > curator.getZookeeperClient().blockUntilConnectedOrTimedOut(); > curator.create().creatingParentsIfNeeded().forPath("/parent", "A string".getBytes()); > > try { > LeaderLatch ll = new LeaderLatch(curator, "parent", "myNode"); > ll.start(); > ll.await(); > System.out.println(ll.hasLeadership()); > ll.close(); > } catch (Exception e) { > e.printStackTrace(); > } > ts.close(); > } > {code} > the system will just hang forever. Inspecting the TestingServer with zkcli shows entries showing up though. > If I switch out the path in the LeaderLatch constructor with "/parent", the same path is created AND the program runs fine. > LeaderLatch should either accept the path all around or fail outright, not this half state that makes things difficult for the user. -- This message was sent by Atlassian JIRA (v6.3.4#6332)