Wang Xixu has posted comments on this change. ( http://gerrit.cloudera.org:8080/20310 )
Change subject: KUDU-3497 optimize leader rebalancer algorithm ...................................................................... Patch Set 10: (1 comment) http://gerrit.cloudera.org:8080/#/c/20310/10//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20310/10//COMMIT_MSG@28 PS10, Line 28: expected leader num = (tablets sum) % (tablets server num) = 0 ? : (tablets sum) / (tablets server num) : : ceil((tablets sum) / (tablets server num)) I don't think this formula is always right. For example, there are 5 tservers. Table 1 with replicator factor 3 is distributed in tserver 1 ~ 3. tservers 1 ~3 has 5 leader tablets in each, and they reach a balance. On the other side, Table 2 with replicator 2 is distributed in tserver 4~5. Adn tserver 4~5 has 2 leader tablets in each, and they reach a balance too. In this cluster, no needs to transfer any tablets to other nodes. But according to your formula, they should transfer. -- 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: Fri, 01 Sep 2023 07:04:56 +0000 Gerrit-HasComments: Yes
