kafka
kafka copied to clipboard
KAFKA-10548: Implement topic deletion logic with the LeaderAndIsr in KIP-516
This PR includes the following changes
- Adding the type field to the LeaderAndIsr request as proposed in KIP-516
- Letting the controller set the type of LeaderAndIsr requests to be either FULL or INCREMENTAL
- Allowing topic deletion to complete even with offline brokers
- Schedule the deletion of replicas with inconsistent topic IDs or not present in the full LeaderAndIsr request
Testing Strategy: This PR added two tests
- testTopicDeletionWithOfflineBrokers: to ensure that topic deletion can proceed even with offline brokers
- testDeletionOfStrayPartitions: to ensure stray replicas whose topic has been deleted will be removed upon broker startup
Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
@lbradstreet @jolshan Can you please take a look? Thank you!
@gitlw Are you still interested in pursuing this fix? I can provide a round of review if so.
@C0urante Thank you! Yes, I'm still interested and will make an update to this PR within this week.
@gitlw were you still planning on rebasing this PR?
We have decided to remove zookeeper in Kafka 4.0 and the LeaderAndIsrReqest will also be removed, so not sure it's worth doing this improvement.