[
https://issues.apache.org/jira/browse/CURATOR-364?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15812610#comment-15812610
]
ASF GitHub Bot commented on CURATOR-364:
----------------------------------------
Github user Randgalt commented on the issue:
https://github.com/apache/curator/pull/177
Note: after merging I noticed that the original PR breaks nodes with
protection as the protection ID is stored in the create builder.
https://github.com/apache/curator/commit/0b699a368bbb5f3c72ab609fa590bf225c2a2d7a
fixes this
> Persistent Node Constructor Requires a Started ZK Connection
> ------------------------------------------------------------
>
> Key: CURATOR-364
> URL: https://issues.apache.org/jira/browse/CURATOR-364
> Project: Apache Curator
> Issue Type: Bug
> Components: Recipes
> Affects Versions: 3.2.1, 2.11.1
> Reporter: Ilya Biryukov
> Assignee: Jordan Zimmerman
> Fix For: 3.3.0, 2.12.0
>
>
> *Steps to reproduce:*
> 1. Initialise an instance of PersistentNode
> 2. Ensure that CuratorFramework is Not Started (Latent)
> *Expected behaviour:*
> PersistentNode constructor should work without an active CuratorFramework
> connection to ZK
> *Actual behaviour*:
> An Exception is thrown:
> {code}
> Caused by: java.lang.IllegalStateException: instance must be started before
> calling this methodDEBUG [2016-12-14 10:25:25,641] akka.event.EventStream:
> logger log1-Slf4jLogger started
> at
> com.google.common.base.Preconditions.checkState(Preconditions.java:150)
> at
> org.apache.curator.framework.imps.CuratorFrameworkImpl.create(CuratorFrameworkImpl.java:351)
> at
> org.apache.curator.framework.recipes.nodes.PersistentNode.<init>(PersistentNode.java:173)
> {code}
> *Thoughts*
> This behaviour is inconsistent with other Zk recepies based on Closable
> interface. PersistentNode should not attempt any Zk communication until
> start() method is called.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)