-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-14561. SCMRatisRequest/ResponseProto should use the shaded protobuf from Ratis #9733
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
base: master
Are you sure you want to change the base?
Conversation
szetszwo
left a comment
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.
@Russole , thanks for working on this!
Let see if the current change can be compiled -- I think we need to change the protobuf compiler or use shading to make SCMRatisRequest/Response extending the protobuf inside Ratis.
|
Thanks @szetszwo! The current change compiles and all CI checks pass: Agreed that SCMRatisRequestProto and SCMRatisResponseProto still extend Let me know if you think it makes sense to open a follow-up JIRA for generating |
| UnsafeByteOperations.unsafeWrap( | ||
| requestProto.toByteString().asReadOnlyByteBuffer())); |
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.
@Russole , I see how this change works now -- it does prevent copying to an array but still needs type conversion from com.google.protobuf.ByteString to org.apache.ratis.thirdparty.com.google.protobuf.ByteString.
Let's fix also the conversion in this JIRA; see ContainerCommandRequestProto as an example for how to do it.
|
Thanks for the clarification! I’m working on this now. I see the issue with the remaining type conversion between I’ll update the PR once this is addressed. |
What changes were proposed in this pull request?
to use Ratis shaded protobuf (
ByteString/ByteBuffer) at the transport boundary.byte[]conversions in the SCM Ratis message path.implementation.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14561
How was this patch tested?