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 2019/07/31 04:53:17 UTC

[GitHub] [hbase] Reidddddd commented on a change in pull request #411: HBASE-22739 check bound where removeRegion

Reidddddd commented on a change in pull request #411: HBASE-22739 check bound where removeRegion
URL: https://github.com/apache/hbase/pull/411#discussion_r309038210
 
 

 ##########
 File path: hbase-server/src/main/java/org/apache/hadoop/hbase/master/balancer/BaseLoadBalancer.java
 ##########
 @@ -870,6 +870,9 @@ void regionMoved(int region, int oldServer, int newServer) {
         if (regions[i] == regionIndex) {
           break;
         }
+        if (i == regions.length - 1) {
+            return Arrays.copyOf(regions, regions.length);
 
 Review comment:
   Here i think we can just return regions. No need to copy the entire array, unless you have a strong reason.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services