You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "Ugo Ciracì (Jira)" <ji...@apache.org> on 2020/08/03 06:53:00 UTC
[jira] [Issue Comment Deleted] (ZOOKEEPER-3904) Remove duplicate
check
[ https://issues.apache.org/jira/browse/ZOOKEEPER-3904?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ugo Ciracì updated ZOOKEEPER-3904:
----------------------------------
Comment: was deleted
(was: Could I take this? It looks pretty simple and I'm new to the project.)
> Remove duplicate check
> ----------------------
>
> Key: ZOOKEEPER-3904
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3904
> Project: ZooKeeper
> Issue Type: Improvement
> Reporter: Guo Jiwei
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> ContainerManager#getCandidates:
> ```
> if ((node != null) && node.getChildren().isEmpty()) {
> /*
> cversion > 0: keep newly created containers from being deleted
> before any children have been added. If you were to create the
> container just before a container cleaning period the container
> would be immediately be deleted.
> */
> if (node.stat.getCversion() > 0) {
> candidates.add(containerPath);
> ```
> It has already checked the below logic, so no need to do it one more time.
> ```
> if ((node != null) && (node.stat.getCversion() > 0) && (node.getChildren().isEmpty())) {
> candidates.add(containerPath);
> }
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)