hanishakoneru commented on a change in pull request #51: HDDS-2311. Fix logic of RetryPolicy in OzoneClientSideTranslatorPB. URL: https://github.com/apache/hadoop-ozone/pull/51#discussion_r336638501
########## File path: hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OzoneManagerProtocolClientSideTranslatorPB.java ########## @@ -347,7 +355,12 @@ private OMResponse submitRequest(OMRequest omRequest) return omResponse; } catch (ServiceException e) { - throw ProtobufHelper.getRemoteException(e); + NotLeaderException notLeaderException = getNotLeaderException(e); + if (notLeaderException == null) { + throw ProtobufHelper.getRemoteException(e); + } else { + throw new NotLeaderException("Could not determine OM Leader."); Review comment: The error message from the previous NotLeaderException points to a single OM node. That is why I am creating a new Exception here to specify that none of the OMs are the leader. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org