[ https://issues.apache.org/jira/browse/KAFKA-5329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16040942#comment-16040942 ]
ASF GitHub Bot commented on KAFKA-5329: --------------------------------------- GitHub user ijuma opened a pull request: https://github.com/apache/kafka/pull/3257 KAFKA-5329: Fix order of replica list in metadata cache You can merge this pull request into a Git repository by running: $ git pull https://github.com/ijuma/kafka kafka-5329-fix-order-of-replica-list-in-metadata-cache Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/3257.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #3257 ---- commit 126101d5df7c24f8a3ee720e95cb34e3e4df0efc Author: Ismael Juma <ism...@juma.me.uk> Date: 2017-06-07T14:05:03Z KAFKA-5329: Fix order of replica list in metadata cache ---- > 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)