hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ramkris...@apache.org
Subject svn commit: r1230654 - in /hbase/branches/0.90: ./ src/main/java/org/apache/hadoop/hbase/regionserver/ src/main/java/org/apache/hadoop/hbase/regionserver/handler/
Date Thu, 12 Jan 2012 17:33:21 GMT
Author: ramkrishna
Date: Thu Jan 12 17:33:21 2012
New Revision: 1230654

URL: http://svn.apache.org/viewvc?rev=1230654&view=rev
Log:
HBASE-5157 Backport HBASE-4880- Region is on service before openRegionHandler completes, may
cause data loss (Ram)

Modified:
    hbase/branches/0.90/CHANGES.txt
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
    hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java

Modified: hbase/branches/0.90/CHANGES.txt
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/CHANGES.txt?rev=1230654&r1=1230653&r2=1230654&view=diff
==============================================================================
--- hbase/branches/0.90/CHANGES.txt (original)
+++ hbase/branches/0.90/CHANGES.txt Thu Jan 12 17:33:21 2012
@@ -155,6 +155,8 @@ Release 0.90.5 - Dec 22, 2011
                internal invocations of other hbase scripts
    HBASE-5156  Backport HBASE-4899 - Region would be assigned twice easily with 
                continually killing server and moving region in testing environment(Ram)
+   HBASE-5157  Backport HBASE-4880- Region is on service before openRegionHandler 
+               completes, may cause data loss (Ram)
 
   NEW FEATURE
    HBASE-4377  [hbck] Offline rebuild .META. from fs data only

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1230654&r1=1230653&r2=1230654&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Thu Jan 12 17:33:21 2012
@@ -1365,9 +1365,6 @@ public class HRegionServer implements HR
           "Region has too many store files");
     }
 
-    // Add to online regions if all above was successful.
-    addToOnlineRegions(r);
-
     // Update ZK, ROOT or META
     if (r.getRegionInfo().isRootRegion()) {
       RootLocationEditor.setRootLocation(getZooKeeper(),

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java?rev=1230654&r1=1230653&r2=1230654&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/SplitTransaction.java
Thu Jan 12 17:33:21 2012
@@ -301,6 +301,8 @@ class SplitTransaction {
       throw new IOException("Failed " +
         bOpener.getName(), bOpener.getException());
     }
+    services.addToOnlineRegions(a);
+    services.addToOnlineRegions(b);
 
     // Leaving here, the splitdir with its dross will be in place but since the
     // split was successful, just leave it; it'll be cleaned when parent is

Modified: hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java?rev=1230654&r1=1230653&r2=1230654&view=diff
==============================================================================
--- hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
(original)
+++ hbase/branches/0.90/src/main/java/org/apache/hadoop/hbase/regionserver/handler/OpenRegionHandler.java
Thu Jan 12 17:33:21 2012
@@ -117,6 +117,9 @@ public class OpenRegionHandler extends E
         cleanupFailedOpen(region);
         return;
       }
+      
+      // Add to online regions if all above was successful.
+      this.rsServices.addToOnlineRegions(region);
 
       // Done!  Successful region open
       LOG.debug("Opened " + name);
@@ -296,7 +299,6 @@ public class OpenRegionHandler extends E
 
   private void cleanupFailedOpen(final HRegion region) throws IOException {
     if (region != null) region.close();
-    this.rsServices.removeFromOnlineRegions(regionInfo.getEncodedName());
   }
 
   /**



Mime
View raw message