Sylvain Wallez created CURATOR-545:
--------------------------------------
Summary: 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
{{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)