huaxiangsun commented on a change in pull request #3657:
URL: https://github.com/apache/hbase/pull/3657#discussion_r700583609



##########
File path: 
hbase-balancer/src/main/java/org/apache/hadoop/hbase/master/balancer/PrimaryRegionCountSkewCostFunction.java
##########
@@ -66,8 +66,12 @@ void prepare(BalancerClusterState cluster) {
   @Override
   protected void regionMoved(int region, int oldServer, int newServer) {
     cost.applyCostsChange(costs -> {
-      costs[oldServer] = computeCostForRegionServer(oldServer);
-      costs[newServer] = computeCostForRegionServer(newServer);
+      if (region == cluster.regionIndexToPrimaryIndex[region]) {

Review comment:
       Can you explain a little bit more about this change? It does not seem 
equal to what computeCostForRegionServer() does. 




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to