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/05/28 04:47:12 UTC
[GitHub] [helix] lei-xia commented on a change in pull request #1035: [WIP] Fix leaking Zk path watch and Callbackhandler issue
lei-xia commented on a change in pull request #1035:
URL: https://github.com/apache/helix/pull/1035#discussion_r431578919
##########
File path: helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
##########
@@ -752,6 +756,10 @@ public void handleChildChange(String parentPath, List<String> currentChilds) {
changeContext.setType(NotificationContext.Type.CALLBACK);
changeContext.setPathChanged(parentPath);
changeContext.setChangeType(_changeType);
+ if (!isReady()) {
+ // avoid leaking CallbackHandler
+ return;
+ }
Review comment:
be careful here since this changes not only the subscribe but also the current behavior, i,e, it won't handle the event at all.
----------------------------------------------------------------
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