Alexey Serbin has posted comments on this change. ( http://gerrit.cloudera.org:8080/20310 )
Change subject: KUDU-3497 optimize leader rebalancer algorithm ...................................................................... Patch Set 10: (2 comments) 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: if (remaining_tablets % remaining_tservers == 0) { : remaining_tablets -= expect_leader_count; : } else { : remaining_tablets -= (should_transfer_count >= 0 ? expect_leader_count : : (expect_leader_count - 1)); : } : remaining_tservers--; > And the logic here is to minus the leaders that has been scheduled in last Isn't the number of remaining tablets under-estimated for a big cluster (i.e. where number of tablet servers is high) due to the following update where (remaining_tablets % remaining_tservers != 0) remaining_tablets -= (should_transfer_count >= 0 ? target_leader_count : (target_leader_count - 1)); ? http://gerrit.cloudera.org:8080/#/c/20310/16/src/kudu/master/auto_leader_rebalancer.cc File src/kudu/master/auto_leader_rebalancer.cc: http://gerrit.cloudera.org:8080/#/c/20310/16/src/kudu/master/auto_leader_rebalancer.cc@241 PS16, Line 241: static_c Could 'remaining_tservers' end up being zero (i.e. remaining_tservers == 0)? How does this code behave in such a case? -- 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: 10 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, 14 Nov 2023 04:39:22 +0000 Gerrit-HasComments: Yes
