Skip to content

Conversation

@GlenGeng-awx
Copy link
Contributor

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

@GlenGeng-awx
Copy link
Contributor Author

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

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"));
Copy link
Contributor

@timmylicheng timmylicheng Dec 3, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we expose scm names or ipadress for the current SCM in the exception message?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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

@timmylicheng
Copy link
Contributor

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

@ChenSammi
Copy link
Contributor

+1

@ChenSammi ChenSammi merged commit 0801203 into apache:HDDS-2823 Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants