Gabriella Lotz has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24516


Change subject: KUDU-3759 Randomize the choice among equally skewed tables
......................................................................

KUDU-3759 Randomize the choice among equally skewed tables

When the greedy rebalancer picks its next move, it first finds the
tables that are most out of balance. Often several tables share the
same worst skew, and only one of them gets fixed per step.

The trouble is that these tied tables came straight out of the
table_info_by_skew multimap, which always returns them in the same
order. The first table in that order kept winning every time, so the
rebalancer would keep hammering one table while other tables with the
same skew sat untouched.

The fix copies the tied tables into a vector and shuffles them with the
generator the algorithm already owns before making a choice, so the
pick gets spread out fairly. This only applies to PICK_RANDOM;
PICK_FIRST stays deterministic as before.

The change affects both the master auto-rebalancer and the CLI rebalance
tool, since both run with PICK_RANDOM. The cross location balancer uses
a different algorithm and is left alone.

Change-Id: I39cc610843d222a3dd2615a26993aba544639b54
---
M src/kudu/rebalance/rebalance_algo-test.cc
M src/kudu/rebalance/rebalance_algo.cc
2 files changed, 75 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/16/24516/1
--
To view, visit http://gerrit.cloudera.org:8080/24516
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I39cc610843d222a3dd2615a26993aba544639b54
Gerrit-Change-Number: 24516
Gerrit-PatchSet: 1
Gerrit-Owner: Gabriella Lotz <[email protected]>

Reply via email to