Guo Jiwei created ZOOKEEPER-3904: ------------------------------------ Summary: Remove duplicate check Key: ZOOKEEPER-3904 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3904 Project: ZooKeeper Issue Type: Improvement Reporter: Guo Jiwei
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)