You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "junkaixue (via GitHub)" <gi...@apache.org> on 2023/02/02 00:39:38 UTC
[GitHub] [helix] junkaixue commented on a diff in pull request #2359: Fix ZkClient retry logic for customized callback and test
junkaixue commented on code in PR #2359:
URL: https://github.com/apache/helix/pull/2359#discussion_r1093888148
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncCallbacks.java:
##########
@@ -259,10 +276,15 @@ public int getRc() {
return _rc;
}
+ public String getPath() {
+ return _path;
+ }
+
@Override
public void notifyCallers() {
LOG.warn("The callback {} has been cancelled.", this);
markOperationDone();
+ handle();
Review Comment:
This confuses me. If we already mark operations are done, then why we need to call handle. Shall we put handle before operation done mark?
Also in previous function logic, mark operation done is in finally statement. It is lastly called after handle(). This logic is changed order.
##########
zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncCallbacks.java:
##########
@@ -198,12 +211,14 @@ public void callback(int rc, String path, Object ctx) {
}
_rc = rc;
+ _path = path;
Review Comment:
Why we need to update this path?
--
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.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
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