HDDS-10481. Use proto 3 in SCMRatisProtocol.proto#9695
HDDS-10481. Use proto 3 in SCMRatisProtocol.proto#9695szetszwo merged 10 commits intoapache:masterfrom
Conversation
szetszwo
left a comment
There was a problem hiding this comment.
@Russole , thanks for working on this!
I suggest to move the old proto to test and rename the outer classname to something like Proto2SCMRatisProtocolForTesting. Then, we can create objects, serialize them using Proto2SCMRatisProtocolForTesting (proto2) and deserialize them using SCMRatisProtocol (proto3) for testing compatibility.
|
Thanks @szetszwo for the review. I’ve updated the patch based on the feedback by adding proto2–proto3 compatibility tests and moving the legacy proto to test scope. |
| */ | ||
| syntax = "proto2"; | ||
| option java_package = "org.apache.hadoop.hdds.protocol.proto.testing"; | ||
| option java_outer_classname = "Proto2SCMRatisProtocolForTesting"; |
There was a problem hiding this comment.
Please also change the file name to Proto2SCMRatisProtocolForTesting.proto.
szetszwo
left a comment
There was a problem hiding this comment.
+1 the change looks good.
|
@Russole , thanks a again for working on this! After merging this PR, filed two related JIRAs HDDS-14561 HDDS-14562; see if you are interested in also working on them. |
|
@szetszwo Appreciate the review and for merging this. |
What changes were proposed in this pull request?
REQUEST_TYPE_UNSPECIFIED = 0to align with proto3 enum default value semantics.SCMRatisProtocol.protofrom proto2 to proto3 by replacing required fields withoptional.What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10481
How was this patch tested?