Song Jiacheng has posted comments on this change. ( http://gerrit.cloudera.org:8080/20310 )
Change subject: KUDU-3497 optimize leader rebalancer algorithm ...................................................................... Patch Set 12: (1 comment) http://gerrit.cloudera.org:8080/#/c/20310/10/src/kudu/master/auto_leader_rebalancer.cc File src/kudu/master/auto_leader_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/20310/10/src/kudu/master/auto_leader_rebalancer.cc@248 PS10, Line 248: int32_t need_transfer_count = from_info.second; : int32_t pick_count = 0; : vector<string>& uuid_leaders = leader_tablet_ids_by_ts_uuid[leader_uuid]; : std::shuffle(uuid_leaders.begin(), uuid_leaders.end(), random_generator_); : // This loop would generate 'uuid_leaders.size()' leader transferring tasks at most. : // Every task would pick a dest uuid to transfer leader. : for (int i = 0; i < u > Constant values are better indeed, done. I remember now. The reason of not keeping the values constant is that if the leader replicas might not be balance. For example, if the distribution of leader replica is 4,4,2, the rebalancer will not do anything. -- To view, visit http://gerrit.cloudera.org:8080/20310 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f1fe796fd98da2d8764da793b7e254319e6348a Gerrit-Change-Number: 20310 Gerrit-PatchSet: 12 Gerrit-Owner: Song Jiacheng <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Song Jiacheng <[email protected]> Gerrit-Reviewer: Tidy Bot (241) Gerrit-Reviewer: Wang Xixu <[email protected]> Gerrit-Reviewer: Yingchun Lai <[email protected]> Gerrit-Reviewer: Yuqi Du <[email protected]> Gerrit-Comment-Date: Tue, 17 Oct 2023 09:16:06 +0000 Gerrit-HasComments: Yes
