[ 
https://issues.apache.org/jira/browse/KAFKA-8468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16913516#comment-16913516
 ] 

Viktor Somogyi-Vass edited comment on KAFKA-8468 at 8/22/19 5:11 PM:
---------------------------------------------------------------------

As part of the deletion process the controller sends out requests to the 
brokers to delete the topics. When the response is back it stores it in its own 
metadata cache which is basically a cache for the zookeeper data but not always 
in synch with that (I guess you see where I'm going).
The deleteTopic server side code will return after the metadata has been 
upgraded and the topic is deleted but at this time the topic still exists in 
Zookeeper. Looking at the logs though I can see that a bit later it will be 
deleted from Zookeeper too but by then it doesn't really matter as there is a 
new create request which fails as per your test.

I'll see how I can make it working so that it waits until the znode deletion is 
also done.


was (Author: viktorsomogyi):
As part of the deletion process the controller sends out requests to the 
brokers to delete the topics. When the response is back it stores it in its own 
metadata cache which is basically a cache for the zookeeper data but not always 
in synch with that (I guess you see where I'm going).
The deleteTopic server side code will return after the metadata has been 
upgraded and the topic is deleted but at this time the topic still exists in 
Zookeeper. Looking at the logs though I can see that a bit later it will be 
deleted from Zookeeper too but by then it doesn't really matter as there is a 
new create request which fails as per your test.

I'll see if I can make it working so that it waits until the znode deletion is 
also done.

> AdminClient.deleteTopics doesn't wait until topic is deleted
> ------------------------------------------------------------
>
>                 Key: KAFKA-8468
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8468
>             Project: Kafka
>          Issue Type: Bug
>    Affects Versions: 2.2.0, 2.3.0, 2.2.1, 2.4.0
>            Reporter: Gabor Somogyi
>            Assignee: Viktor Somogyi-Vass
>            Priority: Major
>
> Please see the example app to reproduce the issue: 
> https://github.com/gaborgsomogyi/kafka-topic-stress
> ZKUtils is deprecated from Kafka version 2.0.0 but there is no real 
> alternative.
> * deleteTopics doesn't wait
> * ZookeeperClient has "private [kafka]" visibility



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to