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 0821610FB8 for ; Sun, 10 Nov 2013 02:58:41 +0000 (UTC) Received: (qmail 23968 invoked by uid 500); 10 Nov 2013 02:58:40 -0000 Delivered-To: apmail-curator-dev-archive@curator.apache.org Received: (qmail 23931 invoked by uid 500); 10 Nov 2013 02:58:40 -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 23923 invoked by uid 99); 10 Nov 2013 02:58:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Nov 2013 02:58:40 +0000 X-ASF-Spam-Status: No, hits=-2000.0 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; Sun, 10 Nov 2013 02:58:38 +0000 Received: (qmail 23919 invoked by uid 99); 10 Nov 2013 02:58:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Nov 2013 02:58:17 +0000 Date: Sun, 10 Nov 2013 02:58:17 +0000 (UTC) From: "Jordan Zimmerman (JIRA)" To: dev@curator.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CURATOR-53) PersistentEphemeralNode does not work when ZK server are not available when the node is started 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-53?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jordan Zimmerman resolved CURATOR-53. ------------------------------------- Resolution: Fixed PersistentEphemeralNode was trying to be too clever about when createNode() should be called. There's no harm in calling it whenever there's an interesting event. It also works around connection instability issues. > PersistentEphemeralNode does not work when ZK server are not available when the node is started > ----------------------------------------------------------------------------------------------- > > Key: CURATOR-53 > URL: https://issues.apache.org/jira/browse/CURATOR-53 > Project: Apache Curator > Issue Type: Bug > Components: Recipes > Affects Versions: 2.2.0-incubating, 2.3.0 > Environment: Windows, Java 1.7, Zookeeper 3.4.5, Curator 2.1.0 > Reporter: Evaristo > Assignee: Jordan Zimmerman > Fix For: 2.3.1 > > Attachments: FailurePenStart.java, FailurePenStart2.java, test.java > > > This sequence is not working: > // ZK servers are not started here > ExponentialBackoffRetry retryPolicy = new ExponentialBackoffRetry(1000, 1, 2000); > CuratorFramework zkClient = CuratorFrameworkFactory.newClient("127.0.0.1:30101", > 4500, > 4500, > retryPolicy); > zkClient.start(); > Thread.sleep(2000); > PersistentEphemeralNode pen = new PersistentEphemeralNode(zkClient, Mode.EPHEMERAL, "/abc/pen", "hello".getBytes()); > Thread.sleep(2000); > // Start ZK servers here > Thread.sleep(2000); > // "/abc/pen" ephemeral node is not created > It is expected that once the CuratorFrameowrk is connected the ephemeral node is created > I attach a program that shows the failure -- This message was sent by Atlassian JIRA (v6.1#6144)