SOLR-11478: Only remove nodeAddedPath node if it exists

This commit is contained in:
Cao Manh Dat 2017-10-19 10:42:07 +07:00
parent cdcfc1520d
commit 99e853faf8
1 changed files with 3 additions and 1 deletions

View File

@ -986,7 +986,9 @@ public class ZkController {
log.info("Remove node as live in ZooKeeper:" + nodePath);
List<Op> ops = new ArrayList<>(2);
ops.add(Op.delete(nodePath, -1));
ops.add(Op.delete(nodeAddedPath, -1));
if (zkClient.exists(nodeAddedPath, true)) {
ops.add(Op.delete(nodeAddedPath, -1));
}
zkClient.multi(ops, true);
}