We have kafka broker cluster version - 2.7 , we have 3 brokers machines
We removed the following topic , by following cli
bin/kafka-topics.sh --delete --zookeeper zoo01:2181 --topic my_first_car
After 1 day
we still see the topics on kafka disk , and also from following command
kafka-topics.sh --zookeeper zoo01:2181 --describe
Topic: my_first_car PartitionCount: 200 ReplicationFactor: 1 Configs: segment.bytes=1073741824,retention.bytes=7434770380 MarkedForDeletion: true
Topic: my_first_car Partition: 0 Leader: none Replicas: 1001 Isr: 1001 MarkedForDeletion: true
Topic: my_first_car Partition: 1 Leader: none Replicas: 1002 Isr: 1002 MarkedForDeletion: true
Topic: my_first_car Partition: 2 Leader: none Replicas: 1003 Isr: 1003 MarkedForDeletion: true
Topic: my_first_car Partition: 3 Leader: none Replicas: 1001 Isr: 1001 MarkedForDeletion: true
Topic: my_first_car Partition: 4 Leader: none Replicas: 1002 Isr: 1002 MarkedForDeletion: true
Topic: my_first_car Partition: 5 Leader: none Replicas: 1003 Isr: 1003 MarkedForDeletion: true
Topic: my_first_car Partition: 6 Leader: none Replicas: 1001 Isr: 1001 MarkedForDeletion: true
Topic: my_first_car Partition: 7 Leader: none Replicas: 1002 Isr: 1002 MarkedForDeletion: true
We also notice that topics is exist on zookeeper under /topics
So in order to try to complete delete this topic we restart all Kafka broker machines , but this isn't help
What are the next steps to delete the topic - my_first_car
It is ridiculous , that Kafka provide cli to delete topic , but actually topic stay on Kafka disk
Note - the last thing that we want is to delete the topic from the disks and from the zookeeper , but this is the ugly way
CodePudding user response:
The issue appears to be Leader: none
. Not sure how the ISR list is updated with valid values, but there seems to be some corruption between Zookeeper and the Controller node such that the Leader is unknown, so the topic data cannot be resolved in order to be deleted.