kafka icon indicating copy to clipboard operation
kafka copied to clipboard

KAFKA-10548: Implement topic deletion logic with the LeaderAndIsr in KIP-516

Open gitlw opened this issue 4 years ago • 3 comments

This PR includes the following changes

  1. Adding the type field to the LeaderAndIsr request as proposed in KIP-516
  2. Letting the controller set the type of LeaderAndIsr requests to be either FULL or INCREMENTAL
  3. Allowing topic deletion to complete even with offline brokers
  4. Schedule the deletion of replicas with inconsistent topic IDs or not present in the full LeaderAndIsr request

Testing Strategy: This PR added two tests

  1. testTopicDeletionWithOfflineBrokers: to ensure that topic deletion can proceed even with offline brokers
  2. 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)

gitlw avatar Aug 30 '21 23:08 gitlw

@lbradstreet @jolshan Can you please take a look? Thank you!

gitlw avatar Sep 15 '21 19:09 gitlw

@gitlw Are you still interested in pursuing this fix? I can provide a round of review if so.

C0urante avatar Sep 06 '22 16:09 C0urante

@C0urante Thank you! Yes, I'm still interested and will make an update to this PR within this week.

gitlw avatar Sep 06 '22 16:09 gitlw

@gitlw were you still planning on rebasing this PR?

C0urante avatar Sep 23 '22 14:09 C0urante

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.

dengziming avatar Jun 29 '23 12:06 dengziming