Skip to content

Conversation

@Russole
Copy link
Contributor

@Russole Russole commented Feb 1, 2026

What changes were proposed in this pull request?

  • Add REQUEST_TYPE_UNSPECIFIED = 0 to align with proto3 enum default value semantics.
  • Migrate SCMRatisProtocol.proto from proto2 to proto3 by replacing required fields with optional.
  • Reserve field numbers and names to prevent accidental reuse in future schema changes.
  • Add required-equivalent presence checks during deserialization, since proto3 no longer validates required fields when deserialization.
  • Add unit tests to verify deserialization fails when required fields are missing

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-10481

How was this patch tested?

@Russole Russole changed the title HDDS-10481. HDDS-10481. Use proto 3 in SCMRatisProtocol.proto Feb 1, 2026
@adoroszlai adoroszlai requested a review from szetszwo February 1, 2026 06:47
Copy link
Contributor

@szetszwo szetszwo left a 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!

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.

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.

2 participants