You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/12/03 12:23:26 UTC

[GitHub] [ozone] GlenGeng commented on a change in pull request #1652: HDDS-4542. Need throw exception to trigger FailoverProxyProvider of SCM client to work

GlenGeng commented on a change in pull request #1652:
URL: https://github.com/apache/ozone/pull/1652#discussion_r535184209



##########
File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/protocol/StorageContainerLocationProtocolServerSideTranslatorPB.java
##########
@@ -133,9 +133,7 @@ private boolean isLeader() throws ServiceException {
   public ScmContainerLocationResponse submitRequest(RpcController controller,
       ScmContainerLocationRequest request) throws ServiceException {
     if (!isLeader()) {
-      return ScmContainerLocationResponse.newBuilder()
-              .setCmdType(request.getCmdType()).setTraceID(request.getTraceID())
-              .setSuccess(false).setStatus(Status.SCM_NOT_LEADER).build();
+      throw new ServiceException(new IOException("SCM IS NOT LEADER"));

Review comment:
       @timmylicheng  Thanks for looking at this patch !
   
   Good point !
   As far as I know, the failover proxy provider will print out the IP address, along with the exception.
   
   We need revisit this code in future, when the failover proxy provider should support leaderHint. I've file a jira to track this task, https://issues.apache.org/jira/browse/HDDS-4545
   
   




----------------------------------------------------------------
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: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org