[ https://issues.apache.org/jira/browse/KAFKA-499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13457592#comment-13457592 ]
Jun Rao commented on KAFKA-499: ------------------------------- Thanks for patch v4. Have a few minor comments. Once those are addressed, the patch can be checked in without another review. 40. ControllerBrokerRequestBatch.sendRequestsToBrokers(): no need for isInit in constructor. 41. ReplicaStateMachine: The purpose of isShuttingDown is probably to guard that we don't startup (shutdown) again if it's already started (shutdown). If so, we should do that. Otherwise, there is really no need for isShuttingDown. Ditto for PartitionStateMachine. 42. PartitionStateMachine: In all places that we mark a partition offline, we should remove the partition from controllerContext.allLeaders. 43. ZookeeperLeaderElector: We can remove all the code in LeaderChangeListener.handleDataChange() now. > Refactor controller state machine > ---------------------------------- > > Key: KAFKA-499 > URL: https://issues.apache.org/jira/browse/KAFKA-499 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Neha Narkhede > Priority: Blocker > Labels: optimization > Attachments: kafka-499-v1.patch, kafka-499-v2.patch, > kafka-499-v3.patch, kafka-499-v4.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > Currently, the controller logic is very procedural and is similar to > KafkaZookeeper. Controller should have a well defined state machine with > states and transitions. This will make it easier to understand and maintain > the controller code. -- 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