-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HBASE-29072 StochasticLoadBalancer#areReplicasColocated ignores rack colocation #6622
base: master
Are you sure you want to change the base?
Conversation
int numReplicas = region.getReplicaId() + 1; | ||
if (numReplicas > maxReplicas) { | ||
maxReplicas = numReplicas; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seemed like a very cheap way to determine the max replica count without actually seeing the table descriptors, which is a limitation of the current balancer implementation.
Sometime I would like to fix this limitation and make the balancer table descriptor aware, but I think that is its own problem
assertFalse(loadBalancer.needsBalance(HConstants.ENSEMBLE_TABLE_NAME, | ||
new BalancerClusterState(map, null, null, new ForTestRackManagerOne()))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that PR where we made the balancer ignorant to rack colocation, we also just naively switched this assertion to false. But the intention of this test was always for the assertion to be true.
I've also split this test up into two tests, because it was always testing two distinct cases (host and rack colocation).
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
This is yet another bite of #6593
In #3729 we removed consideration replicas' rack distribution. This was, in my opinion, a mistake — if we want to be flexible for environments that have too few racks, then we should just do so by skipping this check when the rack count is < the max replica count