kerneltime commented on code in PR #3389:
URL: https://github.com/apache/ozone/pull/3389#discussion_r868217813
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/GrpcOmTransport.java:
##########
@@ -177,17 +181,22 @@ public void start() throws IOException {
public OMResponse submitRequest(OMRequest payload) throws IOException {
OMResponse resp = null;
boolean tryOtherHost = true;
+ int expectedFailoverCount = 0;
ResultCodes resultCode = ResultCodes.INTERNAL_ERROR;
while (tryOtherHost) {
tryOtherHost = false;
+ expectedFailoverCount = syncFailoverCount.get();
Review Comment:
A quick eye balling of this code is a bit confusing, `expectedFailoverCount`
gets set to `syncFailoverCount` here and then passed to `shouldRetry` which
then checks it against `syncFailoverCount`
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/GrpcOmTransport.java:
##########
@@ -177,17 +181,22 @@ public void start() throws IOException {
public OMResponse submitRequest(OMRequest payload) throws IOException {
OMResponse resp = null;
boolean tryOtherHost = true;
+ int expectedFailoverCount = 0;
ResultCodes resultCode = ResultCodes.INTERNAL_ERROR;
while (tryOtherHost) {
tryOtherHost = false;
+ expectedFailoverCount = syncFailoverCount.get();
Review Comment:
A quick eyeballing of this code is a bit confusing, `expectedFailoverCount`
gets set to `syncFailoverCount` here and then passed to `shouldRetry` which
then checks it against `syncFailoverCount`
--
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]