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

Neha Narkhede commented on KAFKA-301:
-------------------------------------

Thanks for the review Jun !

3.1. This check protects against a subtle issue. The take() API removes a node 
only from the internal queue, not from ZK. An item is removed from the ZkQueue 
only through the remove() API. This is to handle "act-and-then-delete" behavior 
for a state change. Now if another item is added to a ZkQueue after the 
previous item was taken, but before it was removed from ZK, there is a risk of 
adding that previous item back into the internal queue. latestQueueItemPriority 
tracks the last item that was taken from the queue, so only items with priority 
larger than that can be added to the queue.

3.2 Will remove that on the checkin.
                
> Implement the broker startup procedure
> --------------------------------------
>
>                 Key: KAFKA-301
>                 URL: https://issues.apache.org/jira/browse/KAFKA-301
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Neha Narkhede
>            Assignee: Neha Narkhede
>              Labels: replication
>         Attachments: kafka-301-draft.patch, kafka-301-v1.patch, 
> kafka-301-v2.patch, kafka-301-v3.patch
>
>
> This JIRA will involve implementing the list of actions to be taken on broker 
> startup, as listed by the brokerStartup() and startReplica() algorithm in the 
> Kafka replication design doc. Since the stateChangeListener is part of 
> KAFKA-44, this JIRA can leave it as a stub.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to