kaisun2000 commented on a change in pull request #1035:
URL: https://github.com/apache/helix/pull/1035#discussion_r432270726
##########
File path:
helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -539,7 +539,11 @@ private void subscribeChildChange(String path,
NotificationContext.Type callback
logger.debug(_manager.getInstanceName() + " subscribes child-change.
path: " + path
+ ", listener: " + _listener);
}
- _zkClient.subscribeChildChanges(path, this);
+ if (callbackType == Type.INIT) {
Review comment:
See watchForchilds comment.
We discussed this in the meeting.
The second case is actually needed for current state callbackhandler
registration. LiveInstance change would cause current state callbackhandler to
be added to ZkHelixManager. And at the time, it can often be the case the
parent node of current state is not yet created. Note, this is the INIT case.
Later CALLBACK case, we should expect the current state parent path be
there. Otherwise, we should not register the watch to Zk server (or we will
leak a path). That is why we need the first case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]