jiajunwang commented on a change in pull request #1344:
URL: https://github.com/apache/helix/pull/1344#discussion_r494690185



##########
File path: 
helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -538,7 +538,12 @@ public void invoke(NotificationContext changeContext) 
throws Exception {
     }
   }
 
-  private void subscribeChildChange(String path, NotificationContext.Type 
callbackType) {
+  /*
+   * If callback type is INIT or CALLBACK, subscribes child change listener to 
the path
+   * and returns the path's children names. The children list might be null 
when the path
+   * doesn't exist or callback type is other than INIT/CALLBACK/FINALIZE.

Review comment:
       The current logic will return a list even the type is not 
INIT/CALLBACK/FINALIZE, right? Although I guess it is expected.
   1. Please fix the comment.
   2. The method name becomes misleading somehow with this change. I guess it 
should be called getChildrenAndSubscribeChildChange. Obviously, not a good 
name. But feel free to change if you have a better idea. This is just a nice to 
have thing.




----------------------------------------------------------------
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]

Reply via email to