Zoltan Chovan has posted comments on this change. ( http://gerrit.cloudera.org:8080/24246 )
Change subject: KUDU-3767 Add global leader awareness to auto leader rebalancer ...................................................................... Patch Set 2: (3 comments) In RunLeaderRebalanceForTable, the algorithm first computes overloaded source tservers using only the current table’s leader distribution. If a tserver is not overloaded for that table, it never becomes a source, even if it is globally overloaded across many tables. e.g. many 1-tablet, RF=3 tables: table1: leader on ts0 table2: leader on ts0 table3: leader on ts0 For each individual table, there is only one leader and three replicas. The per-table target is ceil(1 / 3) = 1, so ts0 has 1 leader and is not considered overloaded for that table. No leader_transfer_source entry is created, so the later global tie-breaker never runs. Globally, though, ts0 may have all leaders. http://gerrit.cloudera.org:8080/#/c/24246/2/src/kudu/master/auto_leader_rebalancer-test.cc File src/kudu/master/auto_leader_rebalancer-test.cc: http://gerrit.cloudera.org:8080/#/c/24246/2/src/kudu/master/auto_leader_rebalancer-test.cc@543 PS2, Line 543: MultiTableLeaderBalance This test doesn’t actually exercise the new global tie-breaker. With 3 tservers, RF=3, and both tables starting with all leaders on tserver 0, the old per-table algorithm would also converge each table to {2,2,2}, so the final cross-table {4,4,4} assertion would pass without this patch. I tested this manually, by removing the changes of the other two files and keeping and running this test. The test needs a setup where per-table scores tie but global counts differ, and the old iteration-order choice would produce a different result. http://gerrit.cloudera.org:8080/#/c/24246/2/src/kudu/master/auto_leader_rebalancer-test.cc@557 PS2, Line 557: multi_table_leader_balance_table2 maybe extract this to a const string, and re-use instead of reading it back at line#561 ? http://gerrit.cloudera.org:8080/#/c/24246/2/src/kudu/master/auto_leader_rebalancer-test.cc@566 PS2, Line 566: SleepFor(MonoDelta::FromMilliseconds(3000)); would it be possible to change this to some sort of assert_eventually block? e.g. acquire the current distribution stats and comparing to the desired state -- To view, visit http://gerrit.cloudera.org:8080/24246 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I47e266d2a06d5c18a50270e0d5e9d4954480f308 Gerrit-Change-Number: 24246 Gerrit-PatchSet: 2 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Reviewer: Zoltan Martonka <[email protected]> Gerrit-Comment-Date: Tue, 19 May 2026 15:27:40 +0000 Gerrit-HasComments: Yes
