You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/09/03 05:41:01 UTC

[GitHub] [helix] xyuanlu commented on a change in pull request #1344: Reduce unnecessary getChildren call in subscribeForChanges

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



##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -533,7 +533,7 @@ public void invoke(NotificationContext changeContext) throws Exception {
     }
   }
 
-  private void subscribeChildChange(String path, NotificationContext.Type callbackType) {
+  private List<String> subscribeChildChange(String path, NotificationContext.Type callbackType) {
     if (callbackType == NotificationContext.Type.INIT

Review comment:
       I feel like we could create an empty list here. So we won’t return a null and no need to do the nullptr check later.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org