[ https://issues.apache.org/jira/browse/KAFKA-351?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jun Rao updated KAFKA-351: -------------------------- Attachment: kafka-351_v4.patch Thanks for the review. 2,3. The difficulty is that a broker currently doesn't cache all topic/partitions (only controller does that). It only knows about topic/partitions assigned to itself. So, it's hard for a broker distinguish between a missing topic and a missing partition. We could cache all topic/partitions in all brokers, but we need to add additional ZK logic in each broker. So, in this patch, just combined UnknownTopicException and InvailidPartitionException into a more general UnknowTopicPartitionException. It's not ideal, but probably not too painful for the user to understand. 5.1 That's a good point. Moved the update (which updates logEndOffsetUpdateTimeMs) of logEndOffset into Partition.updateLeaderHWAndMaybeExpandISR(). This way, both the reader and the writer of logEndOffsetUpdateTimeMs is synchronized by leaderISRUpdateLock. So, there is no need to make it an AtomicLong. 6.3 Just not to make this patch too large. I will create a separate jira for changing the Pool api to use Option. 6.6 and 6.7 Both methods are only called in Partition and the caller already synchronizes on leaderISRUpdateLock. The rest of the comments have been addressed. > Refactor some new components introduced for replication > -------------------------------------------------------- > > Key: KAFKA-351 > URL: https://issues.apache.org/jira/browse/KAFKA-351 > Project: Kafka > Issue Type: Bug > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Jun Rao > Labels: optimization > Fix For: 0.8 > > Attachments: kafka-351_v1.patch, kafka-351_v2.patch, > kafka-351_v3.patch, kafka-351_v4.patch > > > Jay had some good refactoring suggestions as part of the review for KAFKA-46. > I'd like to file this umbrella JIRA with individual sub tasks to cover those > suggestions -- 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