[
https://issues.apache.org/jira/browse/ZOOKEEPER-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13051281#comment-13051281
]
Patrick Hunt commented on ZOOKEEPER-723:
----------------------------------------
bq. How is this different from having lots of ephemeral nodes that need to be
cleaned up on session expiration?
That's a good point, it's not. However the likely hood of someone "misusing" is
higher imo in the case I highlighted, vs the one you detailed. But I agree,
they are the same from a b/e perspective - we should really have some system
tests that exercise this and monitor availability (or lack there of).
bq. Maybe it is a good idea to make a vote?
We (zk community) typically try to stay away from voting around code changes,
we work very very hard to reach consensus on the technical merits. Some good
discussion/ideas still flowing, let's keep whacking on it.
I like your idea about allowing the first child to be named (I was thinking
about suggesting similar) given the first thing you do after creating the
parent is to create the child. What do other ppl think? createContainer would
make things more explicit, increase the likelyhood the user will grok what this
is...
> ephemeral parent znodes
> -----------------------
>
> Key: ZOOKEEPER-723
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-723
> Project: ZooKeeper
> Issue Type: New Feature
> Components: server
> Reporter: Benjamin Reed
> Assignee: Daniel Gómez Ferro
> Attachments: ZOOKEEPER-723.patch, ZOOKEEPER-723.patch
>
>
> ephemeral znodes have the nice property of automatically cleaning up after
> themselves when the creator goes away, but since they can't have children it
> is hard to build subtrees that will cleanup after the clients that are using
> them are gone.
> rather than changing the semantics of ephemeral nodes, i propose ephemeral
> parents: znodes that disappear when they have no more children. this cleanup
> would happen automatically when the last child is removed. an ephemeral
> parent is not tied to any particular session, so even if the creator goes
> away, the ephemeral parent will remain as long as there are children.
> the when an ephemeral parent is created it will have an initial child, so
> that it doesn't get immediately removed. i think this child should be an
> ephemeral znode with a predefined name, "firstChild".
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira