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/12/10 23:45:52 UTC

[GitHub] [helix] dasahcc commented on a change in pull request #1592: Cancel async callback when exception is thrown

dasahcc commented on a change in pull request #1592:
URL: https://github.com/apache/helix/pull/1592#discussion_r540582104



##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncRetryThread.java
##########
@@ -49,7 +49,9 @@ public void run() {
           context.cancel();
           interrupt();
         } catch (Throwable e) {
-          LOG.error("Error retrying callback " + context, e);
+          LOG.error("Error retrying callback {}, cancelling it", context, e);
+          // Cancel the context so the upstream caller can stop waiting
+          context.cancel();

Review comment:
       Let's cancel in final statement?




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