[ https://issues.apache.org/jira/browse/KAFKA-3085?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15092923#comment-15092923 ]
Jun Rao commented on KAFKA-3085: -------------------------------- [~dajac], sorry, I overlooked this when reviewing the patch. The fix in the above PR is still not complete. So I am leaving this jira open. The issue is that we compute things like newBrokerIds based on currentBrokerList, which is the list of broker id returned from ZK. However, if a broker disappears from ZK when we try to read the broker info using the broker id, the broker essentially doesn't exist and shouldn't be included in newBrokerIds. So, perhaps the fix should be (1) compute curBrokers from currentBrokerList and only include live brokers at that time; (2) derive newBrokerIds and deadBrokerIds from curBrokers by comparing with controllerContext.liveOrShuttingDownBrokerIds. Do you want to give this another try? Thanks, > BrokerChangeListener computes inconsistent live/dead broker list > ---------------------------------------------------------------- > > Key: KAFKA-3085 > URL: https://issues.apache.org/jira/browse/KAFKA-3085 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.9.0.0 > Reporter: Jun Rao > Assignee: David Jacot > > On a broker change ZK event, BrokerChangeListener gets the current broker > list from ZK. It then computes a new broker list, a dead broker list, and a > live broker list with more detailed broker info. The new and live broker list > are computed by reading the value associated with each of the current broker > twice. If a broker is de-registered in between, these two list will not be > consistent. -- This message was sent by Atlassian JIRA (v6.3.4#6332)