You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ns...@apache.org on 2011/10/11 04:23:48 UTC

svn commit: r1181594 - /hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Author: nspiegelberg
Date: Tue Oct 11 02:23:47 2011
New Revision: 1181594

URL: http://svn.apache.org/viewvc?rev=1181594&view=rev
Log:
Don't ignore corrupt StoreFiles when opening a region

Summary: We used to ignore StoreFiles that failed to open, which led to a
situation when only a subset of regions was opened, and HBase did not return
results to clients for the affected set of keys. This change makes sure we
propagate IOExceptions coming from an attempt to open a StoreFile all the way up
to HRegionServer.openRegion, where it will lead to a failure to open the whole
region. This way we can avoid returning corrupt data to the application.
Test Plan: Unit tests. 5-node cluster. Dark launch.
Reviewed By: kannan
Reviewers: kannan, nspiegelberg
Commenters: nspiegelberg, dhruba
CC: hbase@lists, , nspiegelberg, dhruba, kannan, mbautin
Revert Plan: OK
Differential Revision: 277786
Task ID: 624776

Modified:
    hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java

Modified: hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java?rev=1181594&r1=1181593&r2=1181594&view=diff
==============================================================================
--- hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java (original)
+++ hbase/branches/0.89/src/main/java/org/apache/hadoop/hbase/regionserver/Store.java Tue Oct 11 02:23:47 2011
@@ -259,17 +259,9 @@ public class Store implements HeapSize {
         LOG.warn("Skipping " + p + " because its empty. HBASE-646 DATA LOSS?");
         continue;
       }
-      StoreFile curfile = null;
-      try {
-        curfile = new StoreFile(fs, p, blockcache, this.conf,
-            this.family.getBloomFilterType(), this.inMemory);
-        curfile.createReader();
-      } catch (IOException ioe) {
-        LOG.warn("Failed open of " + p + "; presumption is that file was " +
-          "corrupted at flush and lost edits picked up by commit log replay. " +
-          "Verify!", ioe);
-        continue;
-      }
+      StoreFile curfile = new StoreFile(fs, p, blockcache, this.conf,
+          this.family.getBloomFilterType(), this.inMemory);
+      curfile.createReader();
       long length = curfile.getReader().length();
       this.storeSize += length;
       if (LOG.isDebugEnabled()) {