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

Jun Rao commented on KAFKA-343:
-------------------------------

Thanks for patch v3. A few more comments:

40. RequestSendThread: brokerId is not used. If the intention is to have 
another broker id representing the source, it probably should be named 
fromBrokerId.

41. KafkaController:
41.1 recoverLeaderAndISRFromZookeeper(), initLeaders(): 
brokerToLeaderAndISRInfosMap.get(b).get can just be  
brokerToLeaderAndISRInfosMap(b)
41.2 recoverLeaderAndISRFromZookeeper: brokerIds is not used, but should be.
41.3 onBrokerChange(): We should batch-send the leaderAndISRRequest to each 
broker.

42. SimpleConsumer,Cluster: no change needed.

Also, just to clarify for other reviewers. The code for broker startup changes 
a bit from the v3 design. In the v3 design, a broker will on startup, (1) read 
all existing topics from ZK, (2) delete those local topics not in ZK, and then 
(3) register itself in ZK. However, a topic can be deleted between steps (1) 
and (3). Since the deletion of those topics won't be communicated from the 
controller (since the broker wasn't registered then), those deleted topics may 
not be cleaned up in the broker. In this patch, on startup, a broker just 
registers itself in ZK. On detecting a new broker, the controller will first 
send the full list of current topics to the new broker with the isInit flag on. 
On receiving the request from the controller, the broker can remove local 
topics not in the request. This avoids the problem in v3 design.
                
> revisit the become leader and become follower state change operations using 
> V3 design
> -------------------------------------------------------------------------------------
>
>                 Key: KAFKA-343
>                 URL: https://issues.apache.org/jira/browse/KAFKA-343
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>    Affects Versions: 0.8
>            Reporter: Jun Rao
>            Assignee: Yang Ye
>             Fix For: 0.8
>
>         Attachments: kafka_343.diff.2, kafka_343.diff.3, kafka_343.patch
>
>
> We need to reimplement become leader/follower using the controller model 
> described in 
> https://cwiki.apache.org/confluence/display/KAFKA/kafka+Detailed+Replication+Design+V3

--
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