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 2021/04/29 21:13:31 UTC
[GitHub] [helix] jiajunwang commented on a change in pull request #1718: Clarify error for ZkSessionMismatchedException in ZkAsyncCallbacks
jiajunwang commented on a change in pull request #1718:
URL: https://github.com/apache/helix/pull/1718#discussion_r623402294
##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/zkclient/callback/ZkAsyncCallbacks.java
##########
@@ -289,7 +290,11 @@ protected boolean needRetry(int rc) {
return false;
}
} catch (ClassCastException | NullPointerException ex) {
- LOG.error("Failed to handle unknown return code {}. Skip retrying.", rc, ex);
+ if(rc == ZK_SESSION_MISMATCHED_CODE) {
Review comment:
This should not fall into Exception handling logic, it is the expected RC number.
So if we are moving all the return code into a new class, then the switch case should check using that new class, and this is no longer a special case.
If, otherwise, we are not using a new class then, we can check this condition before the switch block.
--
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