zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Gómez Ferro (JIRA) <j...@apache.org>
Subject [jira] [Updated] (ZOOKEEPER-723) ephemeral parent znodes
Date Tue, 14 Jun 2011 11:33:47 GMT

     [ https://issues.apache.org/jira/browse/ZOOKEEPER-723?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Daniel Gómez Ferro updated ZOOKEEPER-723:

    Attachment: ZOOKEEPER-723.patch

I implemented this feature with a small modification. The ephemeral parent is created with
no children and it is deleted when its last child is deleted, so there is no need for a "firstChild".

org.apache.zookeeper.test.InvalidSnapshotTest is failing due to the change in the persisted
classes. I guess this change is not as straightforward as I made it, but please comment on
how to do it properly.

> ephemeral parent znodes
> -----------------------
>                 Key: ZOOKEEPER-723
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-723
>             Project: ZooKeeper
>          Issue Type: New Feature
>            Reporter: Benjamin Reed
>         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


View raw message