Skip to content
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

Check for backward compatibility when validating the cluster marker #1619

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

tillrohrmann
Copy link
Contributor

Now the server checks whether it is backward-compatible with the data
directory. If it encounters a version that either needs migration or
cannot be migrated from, then it fails with a BackwardIncompatibility
error.

This fixes #1617.

This PR is based on #1616.

@tillrohrmann
Copy link
Contributor Author

Sorry @slinkydeveloper, I needed to change a bit more since I realized that the cluster marker file also needs to contain the min forward compatible version since older version won't know about newer versions and therefore can't tell by themselves whether they are compatible or not. As part of this change, I simplified the whole logic by removing the compatibility map and replacing it with a single CompatibilityInformation struct. This struct needs to be updated whenever we change forward/backward compatible versions. PTAL.

Copy link
Contributor

@slinkydeveloper slinkydeveloper left a comment

Choose a reason for hiding this comment

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

LGTM

crates/node/src/cluster_marker.rs Show resolved Hide resolved
@tillrohrmann
Copy link
Contributor Author

Thanks for the review @slinkydeveloper. Merging this PR now.

Now the server checks whether it is backward-compatible with the data
directory. If it encounters a version that either needs migration or
cannot be migrated from, then it fails with a BackwardIncompatibility
error.

This fixes restatedev#1617.
@tillrohrmann tillrohrmann merged commit c0eb169 into restatedev:main Jun 11, 2024
3 checks passed
@tillrohrmann tillrohrmann deleted the issues/1617 branch June 11, 2024 15:08
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.

Check for a backwards compatibility/required migration when validating the cluster marker
2 participants