hachikuji opened a new pull request, #12271: URL: https://github.com/apache/kafka/pull/12271
When a reassignment is cancelled, the controller must send `StopReplica` to all Adding replicas to ensure that the partition state is removed. Currently, this does not necessarily result in a bump to the leader epoch, which means that the `StopReplica` may be ignored by the Adding replica due to [KIP-570](https://cwiki.apache.org/confluence/display/KAFKA/KIP-570%3A+Add+leader+epoch+in+StopReplicaRequest). When this happens, the partition becomes stray and must be manually cleaned up. We fix the problem here by ensuring that the leader epoch is bumped when a replica transitions to `OfflineReplica` even if the replica is not a leader or in the current ISR. ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
