Marton Greber has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/24246 )
Change subject: KUDU-3767 Add global leader awareness to auto leader rebalancer (Part 1) ...................................................................... KUDU-3767 Add global leader awareness to auto leader rebalancer (Part 1) The leader rebalancer processes tables independently, so when picking a destination for a leader transfer it only considers per-table leader density. If two follower tservers score equally on that metric, the choice is driven by iteration order, which can consistently favour the same tserver across many tables. This patch threads a global leader count map through the per-table loop. Each call to RunLeaderRebalanceForTable accumulates actual leader counts from the current table and updates the map as moves are planned. When two destination candidates have the same per-table score, the one with the lower global leader count is preferred, steering transfers away from tservers that are already carrying more leaders from earlier tables in the same round. This is part 1 of this addition; part 2 will be a follow-up change adding a post-loop global pass to detect and correct tservers that are globally overloaded even when per-table balance is already achieved. Change-Id: I47e266d2a06d5c18a50270e0d5e9d4954480f308 Reviewed-on: http://gerrit.cloudera.org:8080/24246 Reviewed-by: Marton Greber <[email protected]> Tested-by: Marton Greber <[email protected]> Reviewed-by: Zoltan Chovan <[email protected]> --- M src/kudu/master/auto_leader_rebalancer-test.cc M src/kudu/master/auto_leader_rebalancer.cc M src/kudu/master/auto_leader_rebalancer.h 3 files changed, 244 insertions(+), 20 deletions(-) Approvals: Marton Greber: Looks good to me, approved; Verified Zoltan Chovan: Looks good to me, approved -- 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: merged Gerrit-Change-Id: I47e266d2a06d5c18a50270e0d5e9d4954480f308 Gerrit-Change-Number: 24246 Gerrit-PatchSet: 7 Gerrit-Owner: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Gabriella Lotz <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Marton Greber <[email protected]> Gerrit-Reviewer: Zoltan Chovan <[email protected]> Gerrit-Reviewer: Zoltan Martonka <[email protected]>
