You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Jun Rao (JIRA)" <ji...@apache.org> on 2012/09/07 19:27:07 UTC

[jira] [Commented] (KAFKA-498) Controller code has race conditions and synchronization bugs

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

Jun Rao commented on KAFKA-498:
-------------------------------

Thanks for the patch. Overall, a good cleanup patch. Some minor comments:

1. ControllerBrokerStateInfo: Should we include Broker in this class too?

2. ControllerChannelManager:
2.1  brokers.foreach(broker => brokerStateInfo(broker._1).requestSendThread.start()) can be done as 
    brokers.foreach{ case(brokerId, _)  => brokerStateInfo(brokerId).requestSendThread.start() }
2.2 startup: Should call startRequestSendThread()

3. readLeaderAndIsrFromZookeeper:
3.1 This method also sends leaderAndISR requests to brokers, in addition to reading from ZK. Maybe we can call it readAndSendLeaderAndIsrFromZookeeper?
3.2 If no replicas are assigned to a partition, is it necessary to log the assignment for all partitions? Ditto for onBrokerChange
                
> 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
>
>   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