almostintuitive opened a new pull request, #4293:
URL: https://github.com/apache/iggy/pull/4293

   ## 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
   `StoreConsumerOffset` for a consumer group is refused as not admitted. The 
SDK
   then 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 `pollPrimary` and the attached consumer
   session, and the Rust SDK routes offset writes the same way.
   
   `TestE2E_SplitPrimaryManualCommitPreservesMembership` runs on the existing
   split-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)` in `StoreConsumerOffset` marks where the fix belongs.
   
   Like its auto-commit sibling, the harness test is `#[ignore]` because it 
needs
   Go, so it does not turn CI red.
   
   ## Local Execution
   
   - Not passed: the new test fails as intended, 3 of 3 runs, with
     `consumer group member with client id: 0 does not own partition: 0 ...
     (session 127.0.0.1:20016 -> 127.0.0.1:20000)`. The existing
     
`given_split_primaries_when_go_group_auto_commits_should_preserve_membership`
     passed in the same runs.
   - Pre-commit hooks: `prek run --files <changed>` ran. Everything passed
     (cargo fmt, go fmt, go mod tidy, typos, whitespace) except 
`license-headers`,
     which could not run because `hawkeye` is not installed. All three touched
     files already carry the ASF header and the diff does not touch it. The
     pre-push `golangci-lint (foreign/go)` passed, and
     `cargo clippy -p integration --all-features --tests -- -D warnings` is 
clean.
   
   ## AI Usage
   
   1. Claude (Claude Code).
   2. Investigation (a standalone Docker reproduction first, then reading the Go
      SDK's `sendFrame` failover path and the server's consumer-group fence), 
the
      test and the write-up.
   3. The test was run against a 3-node harness cluster and fails with the error
      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.
   4. Yes.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to