-Re: [jira] [Commented] (ZOOKEEPER-723) ephemeral parent znodes
Benjamin Reed 2011-06-14, 20:23
good point, you can check the cversion of the parent. that was my big objection.
to be honest i can go either way. it is cumbersome to have to do the
firstChild, but i'm wondering if it is easier to explain and manage
that in the code than saying that the znode will go away if there
aren't any children left unless no child have been created. i don't
have a strong feeling one way or the other, but i do lean towards the
are there any others that have an opinion?
On Tue, Jun 14, 2011 at 12:02 PM, Daniel Gómez Ferro (JIRA)
<[EMAIL PROTECTED]> wrote:
> [ https://issues.apache.org/jira/browse/ZOOKEEPER-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13049340#comment-13049340 ]
> Daniel Gómez Ferro commented on ZOOKEEPER-723:
> Couldn't that be checked with the cversion of the parent? I just find it a bit ugly/cumbersome having that firstChild automatically created (that you are probably going to delete right after creating any other child) but that's mostly an aesthetic reason, so if you think its more robust having the firstChild I'll provide a new version of the patch.
>> 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
>> 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
Patrick Hunt 2011-06-14, 21:31