[ https://issues.apache.org/jira/browse/KAFKA-498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Neha Narkhede updated KAFKA-498: -------------------------------- Attachment: kafka-498-v2.patch Thanks for the review ! 1. Good point. Included Broker in ControllerBrokerStateInfo 2.1 brokerStateInfo.foreach(brokerState => startRequestSendThread(brokerState._1)) looks simpler 2.2 Al though it will be slightly inefficient to do that, it probably is easier to read 3.1 This API is pretty badly named and designed. It will be refactored in KAFKA-499, but changed the name to what you suggested for now. 3.2 Not sure it is very useful in the context of the controller's state machine. But right now, it is very unclear as to what the state machine is and which transitions cause what state changes. I think I will have a better handle on this in KAFKA-499. 4. Synchronized the addBroker public API on the brokerLock 5. Synchronized the sendRequest public API on the brokerLock > Controller code has race conditions and synchronization bugs > ------------------------------------------------------------ > > Key: KAFKA-498 > URL: https://issues.apache.org/jira/browse/KAFKA-498 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Neha Narkhede > Labels: bugs > Attachments: kafka-498-v1.patch, kafka-498-v2.patch, > kafka-498-v2.patch > > Original Estimate: 24h > Remaining Estimate: 24h > > The controller maintains some internal data structures that are updated by > state changes triggered by zookeeper listeners. There are race conditions in > the controller channel manager and the controller state machine. -- 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