Fix self-contradictory #commit_offsets description, clarify async Boolean semantics - #996
Merged
mensfeld merged 1 commit intoAug 12, 2026
Conversation
…lean semantics The prose was internally self-contradictory: "sends a request... but immediately gets confirmation. Instead, it returns immediately" - these two clauses directly conflict. Also verified the underlying claim: karafka/lib/karafka/connection/proxy.rb's #commit_offsets catches known synchronous errors (assignment_lost, unknown_member_id, illegal_generation -> false) but does not wait for broker acknowledgment when async, and client.rb's docstring notes this method "may return true despite involuntary partition revocation as it does not resolve to lost_assignment?". So the Boolean return IS available immediately, but it only reflects the local commit request state, not full broker confirmation or partition ownership - the #revoked? recommendation itself has real grounding for that latter gap. Rewrote the paragraph to fix the contradiction and describe accurately what the returned Boolean does and does not tell you. Fixes #44164.
mensfeld
approved these changes
Aug 12, 2026
mensfeld
deleted the
fix/offset-mgmt-commit-offsets-async-boolean-44164
branch
August 12, 2026 06:33
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.
What
`Consumer-Groups/Offset-management.md:70`'s `#commit_offsets` description was internally self-contradictory: "sends a request... but immediately gets confirmation. Instead, it returns immediately" -- these two clauses directly conflict (the second is only true if the first is false).
Investigation
`karafka/lib/karafka/connection/proxy.rb`'s `#commit_offsets` catches known synchronous errors (`assignment_lost`, `unknown_member_id`, `illegal_generation` -> `false`) but does not wait for broker acknowledgment when async, and `connection/client.rb`'s docstring notes this method "may return `true` despite involuntary partition revocation as it does not resolve to `lost_assignment?`."
So the Boolean return is available immediately (contrary to the ticket's initial "not immediately known" framing) -- but it only reflects the local commit request's state, not full broker confirmation or partition ownership. That means the page's `#revoked?` recommendation itself has real grounding, for that latter gap; the actual bug was the contradictory phrasing, not the substance of the recommendation.
Fix
Rewrote the paragraph to remove the contradiction and describe accurately what the returned Boolean does and does not tell you.
Fixes #44164 (Redmine, confidence: likely -- independently re-investigated in depth before fixing, since the original finding's framing did not fully hold up).