[ 
https://issues.apache.org/jira/browse/KUDU-3759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18094952#comment-18094952
 ] 

ASF subversion and git services commented on KUDU-3759:
-------------------------------------------------------

Commit a821a04aadda3e5ae28606ec1a5907b3272cc689 in kudu's branch 
refs/heads/master from Gabriella Lotz
[ https://gitbox.apache.org/repos/asf?p=kudu.git;h=a821a04aa ]

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
Reviewed-on: http://gerrit.cloudera.org:8080/24516
Reviewed-by: Marton Greber <[email protected]>
Tested-by: Marton Greber <[email protected]>
Reviewed-by: Zoltan Chovan <[email protected]>


> Randomize equal-skew table selection
> ------------------------------------
>
>                 Key: KUDU-3759
>                 URL: https://issues.apache.org/jira/browse/KUDU-3759
>             Project: Kudu
>          Issue Type: Sub-task
>            Reporter: Gabriella Lotz
>            Assignee: Gabriella Lotz
>            Priority: Major
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to