-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDDS-1258 - Fix error propagation for SCM protocol #1001
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
/label ozone |
|
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first we need the unify license style.
|
@jiwq I am not sure what you mean by "the unify license style"? Can you point to the file with the issue and what I should do to fix it please? I ran all the failing tests locally and they all passed, so I think they are unrelated to this change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will review again after you fixed these nits. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * <p> | |
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * <p> | |
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * http://www.apache.org/licenses/LICENSE-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | |
| } | |
|
I have push a new version with the formatting issues hopefully addressed. |
|
💔 -1 overall
This message was automatically generated. |
…atus in the wrapper message and throw SCMException for expected error conditions.
|
💔 -1 overall
This message was automatically generated. |
|
/retest |
|
Wow, full green build check with no intermittent failures. How did you do that? ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 LGTM
Thank you the nice work @sodonnel
Now we have the opportunity to propagate the errors and do smart error conversion between scm errors -> om errors.
Following on from HDDS-1674, which changed the SCMBlockLocationProtocol to use a single wrapper message for all child messages, this change ensures that any known SCMException's are caught and the correct code and message written to the wrapper.
Note that the client does not see the benifit of the new error handling, as the generally the client calls CLIENT -> OM -> SCM, and even with this change the OM cannot translate the SCM response codes into a more meaningful error message for the client.