[ https://issues.apache.org/jira/browse/KAFKA-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13294550#comment-13294550 ]
Jun Rao commented on KAFKA-335: ------------------------------- Thanks for patch v3. A few more comments: 31. KafkaController: 31.1 In general, the watcher for a ZK path needs to be subscribed before reading the path. Otherwise, some events on the path could be missed. So in starup(): registerControllerExistListener() needs to be done before tryToBecomeController. In tryToBecomeController(), registerBrokerChangeListener() and registerTopicChangeListener() need to be called before reading brokers and topics from ZK. 31.2 do we need 3 locks? We can probably just use 1 lock to synchronize all access to allBrokers and allTopics. 31.3 tryToBecomeController(): need to add the initial set of brokers to ControllerChannelManager 31.4 need a sessionExpiration listener so that it can clean state after the controller lost its registration (e.g., shut down ControllerChannelManager and call tryToBecomeController). 31.5 In tryToBecomeController, set controllerChannelManager to null if it can't become a controller. 32. BrokerChangeListener.handleChildChange(): should remove deleted brokers from allBrokers. 33. ControllerExistListener.handleDataChange(): If no logic is needed here, add a comment to make it clear. 34. ZkUitls: remove extra new line after getTopicPartitionLeaderAndISR 35. ControllerBasicTest: remove extra new lines btw methods 36. RequestSendThread: Should we name the thread "requestSendThread-brokerid"? > Implement an embedded controller > -------------------------------- > > Key: KAFKA-335 > URL: https://issues.apache.org/jira/browse/KAFKA-335 > Project: Kafka > Issue Type: Sub-task > Components: core > Affects Versions: 0.8 > Reporter: Jun Rao > Assignee: Yang Ye > Fix For: 0.8 > > Attachments: kafka_controller_v1.patch, kafka_controller_v2.patch, > kafka_controller_v3.patch > > Original Estimate: 168h > Remaining Estimate: 168h > > This ticket will implement a controller as described in > https://cwiki.apache.org/confluence/display/KAFKA/kafka+Detailed+Replication+Design+V3 > This includes creating the controller path, setting up necessary watchers > (e.g, Broker path and TopicPath), and failover the controller. -- 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