Repository navigation
test(go): fail when a manual group commit on a split primary drops membership - #4293
Merged
hubcio merged 2 commits intoSep 28, 2026
Merged
Conversation
…mbership A Go StoreConsumerOffset for a consumer group, on a partition whose primary is not the metadata leader, is refused as not admitted. sendFrame then walks the roster and reconnects to the primary under a new client identity. The replayed commit fails with ConsumerGroupPartitionNotOwned and the membership is lost. Auto-commit polls avoid this through the attached consumer session, and the Rust SDK routes offset writes the same way. Add TestE2E_SplitPrimaryManualCommitPreservesMembership on the split-primary fixture, driven by a new ignored harness test that shares the Go runner with the auto-commit test. It fails today. A TODO in StoreConsumerOffset marks where the fix belongs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 task
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4293 +/- ##
=============================================
- Coverage 87.56% 53.99% -33.57%
- Complexity 1575 1576 +1
=============================================
Files 1284 1284
Lines 225392 183384 -42008
Branches 188756 146748 -42008
=============================================
- Hits 197366 99025 -98341
- Misses 23292 79732 +56440
+ Partials 4734 4627 -107
🚀 New features to boost your workflow:
|
hubcio
marked this pull request as ready for review
September 28, 2026 09:41
hubcio
approved these changes
Sep 28, 2026
numinnex
approved these changes
Sep 28, 2026
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.
Which issue does this PR address?
Relates to ##4292
Rationale
The maintainers asked that a new bug come with a failing test. This PR adds only
that test. The fix belongs in the Go SDK's offset-write routing, and is left for
discussion.
What changed?
In a cluster where partition 0's primary is not the metadata leader, a Go
StoreConsumerOffsetfor a consumer group is refused as not admitted. The SDKthen reconnects to the primary under a new client identity. The replayed commit
fails with
ConsumerGroupPartitionNotOwned, and the group membership is lost.Auto-commit polls avoid this through
pollPrimaryand the attached consumersession, and the Rust SDK routes offset writes the same way.
TestE2E_SplitPrimaryManualCommitPreservesMembershipruns on the existingsplit-primary fixture. It joins a group and commits two offsets on partition 0,
then asserts that the commits succeed, the session stays on the coordinator, the
client id is unchanged and the membership count is still 1. A new ignored
harness test,
given_split_primaries_when_go_group_commits_manually_should_preserve_membership,drives it; the existing Go routing test now shares its runner. A
TODO(#4292)inStoreConsumerOffsetmarks where the fix belongs.Like its auto-commit sibling, the harness test is
#[ignore]because it needsGo, so it does not turn CI red.
Local Execution
consumer group member with client id: 0 does not own partition: 0 ... (session 127.0.0.1:20016 -> 127.0.0.1:20000). The existinggiven_split_primaries_when_go_group_auto_commits_should_preserve_membershippassed in the same runs.
prek run --files <changed>ran. Everything passed(cargo fmt, go fmt, go mod tidy, typos, whitespace) except
license-headers,which could not run because
hawkeyeis not installed. All three touchedfiles already carry the ASF header and the diff does not touch it. The
pre-push
golangci-lint (foreign/go)passed, andcargo clippy -p integration --all-features --tests -- -D warningsis clean.AI Usage
SDK's
sendFramefailover path and the server's consumer-group fence), thetest and the write-up.
above. The server log confirms that the commit arrived under a new client id.
Its precondition (coordinator and partition primary are different nodes) is
asserted by the fixture. Every assertion before the commit (join,
membership count 1) passes, so it cannot fail for an unrelated reason.
🤖 Generated with Claude Code