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

add relative offset handling for 0.10+ compressed msgs #721

Closed
wants to merge 2 commits into from

Conversation

dynamix
Copy link

@dynamix dynamix commented Aug 8, 2016

attempted fix for #720

for _, msg := range msgBlock.Messages() {
if prelude && msg.Offset < child.offset {
offset := msg.Offset
if child.conf.Version.IsAtLeast(V0_10_0_0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

If I'm reading the docs properly, this condition should be based on msg.Msg.Version since 0.10 brokers can still use the old format in some configurations.

Copy link
Author

Choose a reason for hiding this comment

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

good point - will change this

@eapache
Copy link
Contributor

eapache commented Aug 15, 2016

Thanks for figuring this out, and sorry for the delay, I've been unfortunately busy with other projects recently. I left a few notes to ensure we handle all the cases properly, but I think this is effectively the right fix.

eapache added a commit that referenced this pull request Aug 23, 2016
New message format does something weird with these. See
https://cwiki.apache.org/confluence/display/KAFKA/KIP-31+-+Move+to+relative+offsets+in+compressed+message+sets

Fixes #720. Supercedes #721. Thanks to @dynamix for the first draft of the fix.
@eapache
Copy link
Contributor

eapache commented Aug 24, 2016

@dynamix I opened #735 which incorporates my most up-to-date understanding of all of these corner cases. Please let me know if that works for you.

@dynamix
Copy link
Author

dynamix commented Aug 26, 2016

#735 does is indeed the correct fix. 👍

@dynamix dynamix closed this Aug 26, 2016
@hollow hollow deleted the realtive_offsets branch July 18, 2023 12:58
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.

3 participants