hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1174447 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
Date Thu, 22 Sep 2011 23:08:18 GMT
Author: tedyu
Date: Thu Sep 22 23:08:17 2011
New Revision: 1174447

URL: http://svn.apache.org/viewvc?rev=1174447&view=rev
Log:
HBASE-4452  Possibility of RS opening a region though tickleOpening fails due to
               znode version mismatch (Ramkrishna)

Modified:
    hbase/trunk/CHANGES.txt
    hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1174447&r1=1174446&r2=1174447&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Thu Sep 22 23:08:17 2011
@@ -291,6 +291,8 @@ Release 0.91.0 - Unreleased
    HBASE-3421  Very wide rows -- 30M plus -- cause us OOME (Nate Putnam)
    HBASE-4153  Handle RegionAlreadyInTransitionException in AssignmentManager
                (Ramkrishna)
+   HBASE-4452  Possibility of RS opening a region though tickleOpening fails due to
+               znode version mismatch (Ramkrishna)
 
   TESTS
    HBASE-4450  test for number of blocks read: to serve as baseline for expected

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java?rev=1174447&r1=1174446&r2=1174447&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
Thu Sep 22 23:08:17 2011
@@ -169,13 +169,14 @@ public class OpenRegionHandler extends E
     // regions-in-transition timeout period.
     long period = Math.max(1, assignmentTimeout/ 3);
     long lastUpdate = now;
+    boolean tickleOpening = true;
     while (!signaller.get() && t.isAlive() && !this.server.isStopped() &&
         !this.rsServices.isStopping() && (endTime > now)) {
       long elapsed = now - lastUpdate;
       if (elapsed > period) {
         // Only tickle OPENING if postOpenDeployTasks is taking some time.
         lastUpdate = now;
-        tickleOpening("post_open_deploy");
+        tickleOpening = tickleOpening("post_open_deploy");
       }
       synchronized (signaller) {
         try {
@@ -204,8 +205,9 @@ public class OpenRegionHandler extends E
     }
 
     // Was there an exception opening the region?  This should trigger on
-    // InterruptedException too.  If so, we failed.
-    return !Thread.interrupted() && t.getException() == null;
+    // InterruptedException too.  If so, we failed.  Even if tickle opening fails
+    // then it is a failure.
+    return ((!Thread.interrupted() && t.getException() == null) && tickleOpening);
   }
 
   /**



Mime
View raw message