[
https://issues.apache.org/jira/browse/KAFKA-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16026753#comment-16026753
]
James Cheng commented on KAFKA-5329:
------------------------------------
I noticed this as well. https://github.com/edenhill/kafkacat/issues/98
I was using the results of "kafkacat -L -J" to calculate the preferred leader
imbalance ratio of my cluster, and my calculation didn't match what the
controller was doing. I eventually figured out it was because the the replica
lists weren't in the same order as what was in zookeeper.
> Replica list in the metadata cache on the broker may have different order
> from zookeeper
> ----------------------------------------------------------------------------------------
>
> Key: KAFKA-5329
> URL: https://issues.apache.org/jira/browse/KAFKA-5329
> Project: Kafka
> Issue Type: Bug
> Affects Versions: 0.10.2.1
> Reporter: Jiangjie Qin
> Labels: newbie
> Fix For: 0.11.0.1
>
>
> It looks that in {{PartitionStateInfo}} we are storing the replicas in a set
> instead of a Seq. This causes the replica order to be lost. In most case it
> is fine, but in the context of preferred leader election, the replica order
> determines which replica is the preferred leader of a partition. It would be
> useful to make the order always be consistent with the order in zookeeper.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)