Skip to content

Conversation

muhamadazmy
Copy link
Contributor

Improve forward compatibility for protocol version negotiation

Summary:
This change ensures forward compatibility with newer protocol versions.
Previously, if an unknown (i.e., future) version was receivied, negotiation would fail because it will be parsed as ProtocolVersion::Unknown.

To fix this, the comparison is now performed using the raw version numbers (numeric) before converting to the concrete ProtocolVersion type.
This allows the system to correctly determine the minimum version, even when one side uses an unrecognized newer version.

@muhamadazmy muhamadazmy requested a review from AhmedSoliman April 9, 2025 17:13
@muhamadazmy muhamadazmy force-pushed the pr3126 branch 2 times, most recently from 0cde59b to 054dd11 Compare April 10, 2025 06:45
Copy link
Contributor

@AhmedSoliman AhmedSoliman left a comment

Choose a reason for hiding this comment

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

Really great catch, it's a shame that we didn't have this in 1.3 but hopefully this makes it to 1.3.1 soon.

Summary:
This change ensures forward compatibility with newer protocol versions.
Previously, if an unknown (i.e., future) version was receivied, negotiation would fail because it will be parsed as `ProtocolVersion::Unknown`.

To fix this, the comparison is now performed using the raw version numbers (numeric) before converting to the concrete `ProtocolVersion` type.
This allows the system to correctly determine the minimum version, even when one side uses an unrecognized newer version.
@muhamadazmy muhamadazmy merged commit d677a6f into restatedev:main Apr 10, 2025
26 checks passed
@muhamadazmy muhamadazmy deleted the pr3126 branch April 10, 2025 08:39
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants