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

Use the VersionedValue version in etcd metdata store #2473

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

muhamadazmy
Copy link
Contributor

@muhamadazmy muhamadazmy commented Jan 7, 2025

Use the VersionedValue version in etcd metdata store

Summary:
Avoid etcd version misalignment with VersionedValue by storing the
version separately in its own key

Fixes #2204

Copy link
Contributor

@tillrohrmann tillrohrmann left a comment

Choose a reason for hiding this comment

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

Thanks a lot for fixing our etcd integration @muhamadazmy! Using an explicit version field looks like an elegant solution. The implementation looks correct to me. I assume that you've tested it locally with etcd, right? +1 for merging.

Comment on lines 190 to 191
let mut version_key = BytesMut::from_iter(key);
version_key.put(&b"::version"[..]);
Copy link
Contributor

Choose a reason for hiding this comment

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

Preallocating the BytesMut might save us an reallocation when adding the ::version suffix.

@muhamadazmy
Copy link
Contributor Author

@tillrohrmann Thank you so much for your review ❤️. Yes, I tested it locally. I will merge after applying your comment 😊

Summary:
Avoid etcd version misalignment with `VersionedValue` by storing the
version separately in its own key

Fixes restatedev#2204
@muhamadazmy muhamadazmy merged commit 483dcd6 into restatedev:main Jan 10, 2025
23 of 24 checks passed
@muhamadazmy muhamadazmy deleted the pr2473 branch January 10, 2025 11:17
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.

Etcd external metadata store assumes aligned versions which makes it broken
2 participants