hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jg...@apache.org
Subject svn commit: r1033259 - in /hbase/trunk: CHANGES.txt src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
Date Tue, 09 Nov 2010 22:05:25 GMT
Author: jgray
Date: Tue Nov  9 22:05:25 2010
New Revision: 1033259

URL: http://svn.apache.org/viewvc?rev=1033259&view=rev
Log:
HBASE-3207 If we get IOException when closing a region, we should still remove it from online
regions and complete the close in ZK

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

Modified: hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/trunk/CHANGES.txt?rev=1033259&r1=1033258&r2=1033259&view=diff
==============================================================================
--- hbase/trunk/CHANGES.txt (original)
+++ hbase/trunk/CHANGES.txt Tue Nov  9 22:05:25 2010
@@ -662,6 +662,8 @@ Release 0.90.0 - Unreleased
                that are equal to too
    HBASE-3141  Master RPC server needs to be started before an RS can check in
    HBASE-3112  Enable and disable of table needs a bit of loving in new master
+   HBASE-3207  If we get IOException when closing a region, we should still
+               remove it from online regions and complete the close in ZK
 
 
   IMPROVEMENTS

Modified: hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java?rev=1033259&r1=1033258&r2=1033259&view=diff
==============================================================================
--- hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
(original)
+++ hbase/trunk/src/main/java/org/apache/hadoop/hbase/regionserver/handler/CloseRegionHandler.java
Tue Nov  9 22:05:25 2010
@@ -116,15 +116,16 @@ public class CloseRegionHandler extends 
       // TODO: If we need to keep updating CLOSING stamp to prevent against
       //       a timeout if this is long-running, need to spin up a thread?
       region.close(abort);
-      this.rsServices.removeFromOnlineRegions(regionInfo.getEncodedName());
     } catch (IOException e) {
-      LOG.error("Closing region " + regionInfo.getRegionNameAsString(), e);
-      if (this.zk) deleteClosingState();
+      LOG.error("Unrecoverable exception while closing region " +
+          regionInfo.getRegionNameAsString() + ", still finishing close", e);
     }
 
+    this.rsServices.removeFromOnlineRegions(regionInfo.getEncodedName());
+
     if (this.zk) setClosedState(expectedVersion, region);
 
-    // Done!  Successful region open
+    // Done!  Region is closed on this RS
     LOG.debug("Closed region " + region.getRegionNameAsString());
   }
 
@@ -155,18 +156,6 @@ public class CloseRegionHandler extends 
   }
 
   /**
-   * @return True if succeeded, false otherwise.
-   */
-  private void deleteClosingState() {
-    try {
-      ZKAssign.deleteClosingNode(server.getZooKeeper(),
-          this.regionInfo.getEncodedName()); 
-    } catch (KeeperException e1) {
-      LOG.error("Error deleting CLOSING node");
-    }
-  }
-
-  /**
    * Create ZK node in CLOSING state.
    * @return The expectedVersion.  If -1, we failed setting CLOSING.
    */



Mime
View raw message