-
Notifications
You must be signed in to change notification settings - Fork 552
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
storage: Use fragmented_vector in OT-state #16642
storage: Use fragmented_vector in OT-state #16642
Conversation
offset_translator_state uses vector to store entries. This may create oversized allocations when the struct is serialized/deserialized. This commit replaces vector with chunked_vector. Both serialized data structure and serialization code path are updated. The version of the data structure is not changed because serde treats any vector-like structure the same and uses the same format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The version of the data structure is not changed because serde treats any vector-like structure the same and uses the same format.
I trust you here. But, shouldn't we have a compatibility test for this struct anyway?
Do we have any integration tests that would catch this breaking during an upgrade? In the general case.
/backport v23.3.x |
Failed to create a backport PR to v23.3.x branch. I tried:
|
@Lazin any thoughts here? |
We're using the same code path for all vector-like structures in serde. They're all serialized using the same format. |
My comment was guided by this https://vectorizedio.atlassian.net/wiki/spaces/CORE/pages/244252675/Serialization#Testing Looking at the codebase I don't see binary blobs being tested from older versions against new definitions. I'm looking in the wrong place or we actually don't test that anywhere? |
there are some tests in the tree on a case-by-case basis, but we don't have a systematic framework for testing data across versions. we started this project a couple years ago, and made pretty good progress. we really should finish it! at least in this pr, the element being serialized doesn't change, so i don't think there is a problem. |
offset_translator_state uses vector to store entries. This may create oversized allocations when the struct is serialized/deserialized. This commit replaces vector with chunked_vector.
Both serialized data structure and serialization code path are updated. The version of the data structure is not changed because serde treats any vector-like structure the same and uses the same format.
Backports Required
Release Notes
Bug Fixes