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

Neha Narkhede commented on KAFKA-340:
-------------------------------------

Thanks for patch v2, looks good overall. Couple minor questions -

3. KafkaController

3.1 In maybeRemoveReplicaFromIsr, let's add a warn statement that says why the 
replica was not removed from the isr. There are 3 conditions when that happens, 
lets state which condition was satisfied. This will be very useful for 
debugging.
3.2 If removing the replica from isr is unnecessary, why do we still have to 
send the leader and isr request to the leader ?
3.3 In the OfflineReplica state change, since the leader doesn't change, we 
probably don't need to update the leader and isr cache too. Realize that this 
is not introduced in this patch, but will be nice to fix it anyway.
3.4 What is the point of sending leader and isr request at the end of 
shutdownBroker, since the OfflineReplica state change would've taken care of 
that anyway. It seems like you just need to send the stop replica request with 
the delete partitions flag turned off, no ?

4. PartitionLeaderSelector

Minor logging correction - So far we have been using [%s,%d] convention for 
logging topic-partition. Let's change the following logging statement to do the 
same -
debug("Partition %s-%d : current leader = %d, new leader = %d"

5. StopReplicaRequest

Probably makes sense to change warn to error or even throw exception to alert 
on an invalid byte in the stop replica request. This is pretty serious and 
probably points to corruption somewhere in the code

                
> 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