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 08:31:50 UTC

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

GlenGeng opened a new pull request #1652:
URL: https://github.com/apache/ozone/pull/1652


   ## What changes were proposed in this pull request?
   
   ScmBlockLocationProtocolServerSideTranslatorPB and StorageContainerLocationProtocolServerSideTranslatorPB need throw exception to trigger FailoverProxyProvider of SCM client to work.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-4542
   
   ## How was this patch tested?
   
   CI


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


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

Posted by GitBox <gi...@apache.org>.
GlenGeng commented on pull request #1652:
URL: https://github.com/apache/ozone/pull/1652#issuecomment-737807194


   @ChenSammi @timmylicheng @nandakumar131  Please take a look at this PR. This is one of the hot fix found during the phase 1.5 test.


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


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

Posted by GitBox <gi...@apache.org>.
ChenSammi commented on pull request #1652:
URL: https://github.com/apache/ozone/pull/1652#issuecomment-738618630


   +1


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


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

Posted by GitBox <gi...@apache.org>.
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 in the exception message?




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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
timmylicheng commented on pull request #1652:
URL: https://github.com/apache/ozone/pull/1652#issuecomment-737884248


   Thanks @GlenGeng 's contribution. Overall LGTM. Just left a comment inline.


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


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

Posted by GitBox <gi...@apache.org>.
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


[GitHub] [ozone] ChenSammi merged pull request #1652: HDDS-4542. Need throw exception to trigger FailoverProxyProvider of SCM client to work

Posted by GitBox <gi...@apache.org>.
ChenSammi merged pull request #1652:
URL: https://github.com/apache/ozone/pull/1652


   


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