Gargi-jais11 commented on code in PR #9546:
URL: https://github.com/apache/ozone/pull/9546#discussion_r2663547282
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/GrpcOmTransport.java:
##########
@@ -102,8 +101,7 @@ public GrpcOmTransport(ConfigurationSource conf,
this.clients = new HashMap<>();
this.conf = conf;
this.host = new AtomicReference();
- this.failoverCount = 0;
- this.syncFailoverCount = new AtomicInteger();
+ this.globalFailoverCount = new AtomicInteger();
secConfig = new SecurityConfig(conf);
Review Comment:
This is not related to your changes, it would be good if you do this as well.
**Nit:** Extra blank line - use single line spacing.
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/GrpcOmTransport.java:
##########
@@ -251,11 +250,11 @@ private Exception unwrapException(Exception ex) {
return grpcException;
}
- private boolean shouldRetry(Exception ex, int expectedFailoverCount) {
+ private boolean shouldRetry(Exception ex, int expectedFailoverCount, int
requestFailoverCount) {
boolean retry = false;
RetryPolicy.RetryAction action = null;
try {
- action = retryPolicy.shouldRetry((Exception)ex, 0, failoverCount++,
true);
+ action = retryPolicy.shouldRetry((Exception)ex, 0, requestFailoverCount,
true);
Review Comment:
Nit: Redundant cast - ex is already Exception type.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]