splett2 opened a new pull request, #12489: URL: https://github.com/apache/kafka/pull/12489
### What This PR fixes an AlterPartition regression introduced in https://github.com/apache/kafka/pull/12032 When an AlterPartition request succeeds, the partition epoch gets bumped. The sender also relies on the AlterPartition response to be informed of the new partition epoch in non-KRaft mode. If the sender times out the request before a response is sent, the sender will have a stale partition epoch compared to the ZK controller state and will be fenced on subsequent AlterPartition request attempts. ### Testing The existing AlterPartition idempotency test did not catch this regression because the test uses the current partitionEpoch for the AlterPartition request. We update the test to try the request with various partition epochs. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org