Xuze Yang created KAFKA-17198: --------------------------------- Summary: Partition imbalance after alter due to inconsistent order of broker list Key: KAFKA-17198 URL: https://issues.apache.org/jira/browse/KAFKA-17198 Project: Kafka Issue Type: Bug Components: core Affects Versions: 2.7.2 Reporter: Xuze Yang
Three broker environments. Create a topic with 1 replica and 2 partition, and then alter the topic to 3 partitions, which are not evenly distributed across 3 brokers. command as belows: #Create a topic with 1 replica and 2 partitions kafka-topics.sh --create --bootstrap-server 192.168.181.204:9092 --replication-factor 1 --partitions 2 --topic test #Expand to 3 partitions kafka-topics.sh --bootstrap-server 192.168.181.204:9092 --alter --topic test --partitions 3 #View the distribution of topic partitions kafka-topics.sh --bootstrap-server 192.168.181.204:9092 --describe --topic test Repeat the above command 5 times to obtain 5 topics: test1, test2, test3, test4, and test5. The partition distribution of the 5 topics is shown below: !复现问题-分区分布不均衡.png! It can be seen that each topic's 3 partitions are only distributed on 2 brokers, instead of the expected 3 brokers. -- This message was sent by Atlassian Jira (v8.20.10#820010)