[ 
https://issues.apache.org/jira/browse/CURATOR-545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16970828#comment-16970828
 ] 

Jordan Zimmerman commented on CURATOR-545:
------------------------------------------

Thinking about this more - the original ZooKeeper issue maybe the proper way to 
handle this. If a Container node never has any children it should be cleaned 
eventually. 

> PersistentTtlNode can leave dangling containers behind
> ------------------------------------------------------
>
>                 Key: CURATOR-545
>                 URL: https://issues.apache.org/jira/browse/CURATOR-545
>             Project: Apache Curator
>          Issue Type: Bug
>          Components: Recipes
>    Affects Versions: 4.2.0
>            Reporter: Sylvain Wallez
>            Priority: Major
>
> {{PersistentTtlNode}} creates a container as a {{PersistentNode}} and then 
> adds a TTL node in it named {{touch}} that is refreshed periodically.
> We encountered an issue were the application crashed (or was disconnected 
> from ZooKeeper) between the creation of the container and the creation of the 
> {{touch}} child.
> ZooKeeper doesn't delete containers that never had any children. So this 
> result in this container node to stay around forever and never expire.
> A fix for that is to create both container and {{touch}} child as part of a 
> single transaction.
> Since {{PersistentTtlNode}} delegates to {{PersistentNode}} this may require 
> quite some refactoring of the recipe. But I actually don't understand why the 
> container has to be a {{PersistentNode}} and is not a regular container.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to