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

Neha Narkhede commented on KAFKA-1681:
--------------------------------------

[~sriharsha], adding that to the end of the start() API might unnecessarily 
start the thread, possibly have it wait and then signal it. I think it is 
easier to just set deleteTopicStateChanged to true before starting the thread. 
Also, I thought about the other possible race condition where the controller 
completes starting the delete topic manager and effectively the delete topic 
thread and a watch related to delete topic fires before the delete topic thread 
waits on the condition. The controller watch would then call 
resumeTopicDeletion which would signal a non waiting thread. That seemed like a 
problem at first, but it's not since when the thread invokes 
awaitTopicDeletion.., it would find the deleteTopicStateChanged to be true, so 
it will proceed to acting on topicsToBeDeleted.

In short, the previous code was right :)

> Newly elected KafkaController might not start deletion of pending topics
> ------------------------------------------------------------------------
>
>                 Key: KAFKA-1681
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1681
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Sriharsha Chintalapani
>            Priority: Blocker
>             Fix For: 0.8.2
>
>
> As part of KAFKA-1663 deleteTopicStateChanged.set(true) is removed from 
> start(). This will cause newly elected kafka controller not to process the 
> existing delete topic requests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to