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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to