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/11/03 14:00:33 UTC

[GitHub] [helix] xyuanlu commented on a change in pull request #1504: Remove duplicate subscribe in CallBackHandler

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



##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -402,13 +357,9 @@ public void invoke(NotificationContext changeContext) throws Exception {
       }
       _expectTypes = nextNotificationType.get(type);
 
-      if (type == Type.INIT || type == Type.FINALIZE) {
+      if (type == Type.INIT || type == Type.FINALIZE || changeContext.getIsChildChange()) {
         subscribeForChanges(changeContext.getType(), _path, _watchChild);
-      } else {
-        // put SubscribeForChange run in async thread to reduce the latency of zk callback handling.
-        subscribeForChangesAsyn(changeContext.getType(), _path, _watchChild);

Review comment:
       TFTR. The duplicated subscribeForChanges in HandleChildChange and do resubscribe for child change in line 361. For data changes, this async subscribe is also duplicated since the path is already resubscribed in zkClient. 




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