HBASE-30405 Skip locality candidates for regions already at best loca… by Sigma-Ma · Pull Request #8754 · apache/hbase · GitHub
Skip to content

HBASE-30405 Skip locality candidates for regions already at best loca… - #8754

Open
Sigma-Ma wants to merge 1 commit into
apache:masterfrom
Sigma-Ma:HBASE-30405-avoid-locality-tie-candidates
Open

Sigma-Ma wants to merge 1 commit into
apache:masterfrom
Sigma-Ma:HBASE-30405-avoid-locality-tie-candidates

Conversation

@Sigma-Ma

@Sigma-Ma Sigma-Ma commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

JIRA: https://issues.apache.org/jira/browse/HBASE-30405.

What changes were proposed in this pull request?

Compare the current server’s locality with the selected target before generating a locality candidate. Skip regions already at the best locality, including after simulated region moves.

Why are the changes needed?

When multiple servers have the same locality, the selected target may differ from the current server. Comparing only server indices can produce move or swap candidates without improving that region’s locality.

How was this patch tested?

mvn -B -ntp -pl hbase-balancer -am -PsingleJVMTests -Dtest=TestLocalityBasedCandidateGenerator,TestStochasticLoadBalancer,TestBaseLoadBalancer,TestStochasticLoadBalancerBalanceCluster -Dsurefire.failIfNoSpecifiedTests=false -Dsurefire.rerunFailingTestsCount=0 test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant