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 11:29:45 UTC

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

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



##########
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:
       Shall we expose scm names or ipadress for the current SCM?




----------------------------------------------------------------
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