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



##########
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:
       Yes if the move is to assign a region that is currently not on any 
server.




-- 
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