-
Notifications
You must be signed in to change notification settings - Fork 573
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
[V22.1.x] backport of #4901 #5068
Conversation
Signed-off-by: Michal Maslanka <michal@vectorized.io> (cherry picked from commit d32ac70)
When serialized a key is already an iobuf. Wrapping it with another serialization layer is incorrect as it introduces additional size field in the binary format that deserializer doesn't expect. Signed-off-by: Michal Maslanka <michal@vectorized.io> (cherry picked from commit 412dbcd)
Previously in redpanda we had an error leading to wrapping tombstone record keys with an iobuf serialization envelope. In order to provide compatibility and be able to read keys wrapped with an additional iobuf we introduce this check. The check validates the key version being in allowed range. Otherwise we try to unwrap a key from iobuf. Signed-off-by: Michal Maslanka <michal@vectorized.io> (cherry picked from commit 19ee4eb)
Added test validating a compatibility of decoding group metadata keys wrapped in iobuf. Signed-off-by: Michal Maslanka <michal@vectorized.io> (cherry picked from commit a352a17)
the python in the cover letter looks outdated. perhaps link to the updated one i posted on the original issue? |
done |
Since this didn't backport cleanly, were all the merge conflicts trivial / non-functional? Otherwise LGTM assuming the cover letter is the right one. |
yes, they were, related to tests |
Cover letter
Group metadata key serializer returns an iobuf. Wrapping it with another serialization layer is incorrect as it introduces additional size field in the binary format that deserializer does not expect. This leads to deserialization error and exception is being thrown.
Fixes: #4900
Fixes: #5008
Proof for iobuf unwrapping approach
Release notes