hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjus...@apache.org
Subject svn commit: r1465528 - /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java
Date Mon, 08 Apr 2013 02:29:44 GMT
Author: zjushch
Date: Mon Apr  8 02:29:44 2013
New Revision: 1465528

URL: http://svn.apache.org/r1465528
Log:
HBASE-8287 TestRegionMergeTransactionOnCluster failed in trunk build #4010

Modified:
    hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java

Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java?rev=1465528&r1=1465527&r2=1465528&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java
(original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/master/handler/DispatchMergingRegionHandler.java
Mon Apr  8 02:29:44 2013
@@ -121,10 +121,14 @@ public class DispatchMergingRegionHandle
       while (!masterServices.isStopped()) {
         try {
           Thread.sleep(20);
+          // Make sure check RIT first, then get region location, otherwise
+          // we would make a wrong result if region is online between getting
+          // region location and checking RIT
+          boolean isRIT = regionStates.isRegionInTransition(region_b);
           region_b_location = masterServices.getAssignmentManager()
               .getRegionStates().getRegionServerOfRegion(region_b);
           onSameRS = region_a_location.equals(region_b_location);
-          if (onSameRS || !regionStates.isRegionInTransition(region_b)) {
+          if (onSameRS || !isRIT) {
             // Regions are on the same RS, or region_b is not in
             // RegionInTransition any more
             break;



Mime
View raw message