You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2021/10/07 18:40:28 UTC

[GitHub] [hbase] clarax commented on a change in pull request #3729: HBASE-26327 Replicas cohosted on a rack shouldn't keep triggering Bal…

clarax commented on a change in pull request #3729:
URL: https://github.com/apache/hbase/pull/3729#discussion_r724439130



##########
File path: hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/StochasticLoadBalancer.java
##########
@@ -310,14 +310,7 @@ void updateMetricsSize(int size) {
 
   private boolean areSomeRegionReplicasColocated(BalancerClusterState c) {
     regionReplicaHostCostFunction.prepare(c);
-    if (Math.abs(regionReplicaHostCostFunction.cost()) > CostFunction.COST_EPSILON) {
-      return true;
-    }
-    regionReplicaRackCostFunction.prepare(c);
-    if (Math.abs(regionReplicaRackCostFunction.cost()) > CostFunction.COST_EPSILON) {
-      return true;
-    }
-    return false;
+    return (Math.abs(regionReplicaHostCostFunction.cost()) > CostFunction.COST_EPSILON);

Review comment:
       We no longer force balancer to run if there are still cohosted replicas on racks:
   1. there are cases it cannot be satisfied 
   2. there are cases we have to accept it as a compromise to have better region count distribution.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org