[
https://issues.apache.org/jira/browse/ZOOKEEPER-2163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14494742#comment-14494742
]
ASF GitHub Bot commented on ZOOKEEPER-2163:
-------------------------------------------
GitHub user Randgalt opened a pull request:
https://github.com/apache/zookeeper/pull/29
ZOOKEEPER-2163 - Introduce new ZNode type: container
Major changes:
* New APIs to create container nodes (in ZooKeeper.java)
* New OpCode for createContainer, deleteContainer (deleteContainer is used
internally only)
* New class ContainerManager which processes empty containers using a
timer. This is meant to operate only in the leader
* DataTree - overload the meaning of ephemeralOwner. When its value is
DataTree.CONTAINER_EPHEMERAL_OWNER, it's a container node
* PrepRequestProcessor - code to create containers and process
deleteContainer requests
* zookeeper.jute - CreateContainerRequest, and CreateContainerTxn
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/Randgalt/zookeeper ZOOKEEPER-2163
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zookeeper/pull/29.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #29
----
commit 508b2758afae9c8a84a0c00703c28e664c11016e
Author: randgalt <[email protected]>
Date: 2015-04-13T20:12:35Z
ZOOKEEPER-2163 intial work at defining createContainer API and a few tests
commit 77677e40d1b90fe2c0e795095ba2a84c9c763b91
Author: randgalt <[email protected]>
Date: 2015-04-14T15:45:29Z
ZOOKEEPER-2163 - wip
commit 19e466eb3b193bc4dd84c68ab59c4e4d4ba0708a
Author: randgalt <[email protected]>
Date: 2015-04-14T17:14:16Z
ZOOKEEPER-2163 - basic workings complete. We now have a checkContainers()
method that will delete candidate containers
commit d386c5ab458065e8cdd93c8b59eef3829e973da9
Author: randgalt <[email protected]>
Date: 2015-04-14T17:53:48Z
ZOOKEEPER-2163 more testing
commit 88cd089456c0d66d37b4d6be33b9989866100d14
Author: randgalt <[email protected]>
Date: 2015-04-14T17:55:16Z
ZOOKEEPER-2163 added back ACLs to containers
commit 1346587ff474636fbff238242245594a1fdf10a9
Author: randgalt <[email protected]>
Date: 2015-04-14T19:18:17Z
ZOOKEEPER-2163 first pass now complete.
commit 301af7707398bf9a9eb1722cfd93d2599396cc16
Author: randgalt <[email protected]>
Date: 2015-04-14T19:40:56Z
ZOOKEEPER-2163 some refactoring, doc, etc.
----
> Introduce new ZNode type: container
> -----------------------------------
>
> Key: ZOOKEEPER-2163
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2163
> Project: ZooKeeper
> Issue Type: New Feature
> Components: c client, java client, server
> Affects Versions: 3.5.0
> Reporter: Jordan Zimmerman
>
> BACKGROUND
> ============
> A recurring problem for ZooKeeper users is garbage collection of parent
> nodes. Many recipes (e.g. locks, leaders, etc.) call for the creation of a
> parent node under which participants create sequential nodes. When the
> participant is done, it deletes its node. In practice, the ZooKeeper tree
> begins to fill up with orphaned parent nodes that are no longer needed. The
> ZooKeeper APIs don’t provide a way to clean these. Over time, ZooKeeper can
> become unstable due to the number of these nodes.
> CURRENT SOLUTIONS
> ===================
> Apache Curator has a workaround solution for this by providing the Reaper
> class which runs in the background looking for orphaned parent nodes and
> deleting them. This isn’t ideal and it would be better if ZooKeeper supported
> this directly.
> PROPOSAL
> =========
> ZOOKEEPER-723 and ZOOKEEPER-834 have been proposed to allow EPHEMERAL nodes
> to contain child nodes. This is not optimum as EPHEMERALs are tied to a
> session and the general use case of parent nodes is for PERSISTENT nodes.
> This proposal adds a new node type, CONTAINER. A CONTAINER node is the same
> as a PERSISTENT node with the additional property that when its last child is
> deleted, it is deleted (and CONTAINER nodes recursively up the tree are
> deleted if empty).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)