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

k/group_metadata: added support for v1 offset metadata value #7923

Merged
merged 1 commit into from
Dec 25, 2022

Conversation

mmaslankaprv
Copy link
Member

Redpanda maintains on disk format compatibility with Kafka for __consumer_offsets topic messages. Added support for expiry_timestamp field that was part of OffsetCommitValue version 1. Previously redpanda implementation defaulted to the most recent version 3.

Expiry timestamp may be set by clients using older versions of OffsetCommit requests. To maintain compatibility we must persist the value for older messages.

Backports Required

  • none - not a bug fix
  • none - issue does not exist in previous branches
  • none - papercut/not impactful enough to backport
  • v22.3.x
  • v22.2.x
  • v22.1.x

UX Changes

Release Notes

  • none

Redpanda maintains on disk format compatibility with Kafka for
`__consumer_offsets` topic messages. Added support for
`expiry_timestamp` field that was part of `OffsetCommitValue` version 1.
Previously redpanda implementation defaulted to the most recent version 3.

Expiry timestamp may be set by clients using older versions of
`OffsetCommit` requests. To maintain compatibility we must persist the
value for older messages.

Signed-off-by: Michal Maslanka <michal@redpanda.com>
writer.write(v.metadata);
writer.write(v.commit_timestamp);
if (v.version == group_metadata_version{1}) {
writer.write(v.expiry_timestamp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Question, could there ever be an issue with compatibility across versions because we were always deserializing this int64 value but never serializing it?

Copy link
Member Author

Choose a reason for hiding this comment

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

not really since we only deserializing this for version == 1

@dotnwat
Copy link
Member

dotnwat commented Dec 25, 2022

Failure is flippy test

@dotnwat dotnwat merged commit fe2976e into redpanda-data:dev Dec 25, 2022
dotnwat added a commit that referenced this pull request Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants