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

Jun Rao commented on KAFKA-340:
-------------------------------

Thanks for patch v2. Some more comments and clarification:

20. ControllerContext.liveBrokers: We already filter out shutdown brokers in 
the getter. Do we still need to do the filtering at the setter?

21. KafkaController.shutdownBroker():
21.1 We probably should synchronize this method to allow only 1 outstanding 
shutdown operation at a time. Various maps in ControllerContext are updated in 
this method and they are not concurrent.
21.2 My understanding is that this method returns the number of partitions 
whose leader is still on this broker. If so, shouldn't partitionsRemaining be 
updated after leaders are moved? Also, could you add a comment to this method 
to describe what it does and what the return value is?
21.3 I think we need to hold the controller lock when calling 
maybeRemoveReplicaFromIsr.
21.4 We should send stopReplica requests to all partitions on this broker, not 
just partitions who are followers, right?


                
> Implement clean shutdown in 0.8
> -------------------------------
>
>                 Key: KAFKA-340
>                 URL: https://issues.apache.org/jira/browse/KAFKA-340
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Joel Koshy
>            Priority: Blocker
>              Labels: bugs
>         Attachments: KAFKA-340-v1.patch, KAFKA-340-v2.patch
>
>   Original Estimate: 168h
>  Remaining Estimate: 168h
>
> If we are shutting down a broker when the ISR of a partition includes only 
> that broker, we could lose some messages that have been previously committed. 
> For clean shutdown, we need to guarantee that there is at least 1 other 
> broker in ISR after the broker is shut down.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to