correct lengthRemain handling into message_read.readMessageV2#1411
Open
Dmitriy-Kulagin wants to merge 1 commit into
Open
correct lengthRemain handling into message_read.readMessageV2#1411Dmitriy-Kulagin wants to merge 1 commit into
Dmitriy-Kulagin wants to merge 1 commit into
Conversation
This was referenced Nov 17, 2025
Open
Author
|
I'm pretty sure that this MR can fix several different issues that I've described in this issue |
greg0ire
reviewed
Jan 8, 2026
greg0ire
added a commit
to greg0ire/kafka-go
that referenced
this pull request
Jan 8, 2026
|
I've asked my LLM to create this failing test: #1420 It fails without your patch, and works with it (when I try locally). Feel free to incorporate it in your PR. Also, my colleagues experienced the issue, and they could confirm this fixes it. |
greg0ire
added a commit
to greg0ire/kafka-go
that referenced
this pull request
Jan 8, 2026
greg0ire
added a commit
to greg0ire/kafka-go
that referenced
this pull request
Jan 8, 2026
|
You should probably squash all 3 commits into one and force push, maybe the build will pass this time. @petedannemann @hhahn-tw please review 🙏 |
Co-authored-by: Grégoire Paris <postmaster@greg0ire.fr>
ed54559 to
21051a4
Compare
Author
|
The squasing of commits helped to pass all checks! |
Author
|
@petedannemann @hhahn-tw please review it please 🙏 or suggest somebody else who can finally merge it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In topic with log compaction the incorrect handling of lengthRemain into readMessageV2 lead to endlessly reading of the same compacted batch. It is happens because skipping offset to batch.lastOffset assumes that lengthRemain ==0 but without this correction lengthRemain became negative and comparison with zero doesn't work.