You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2014/02/25 01:58:56 UTC
svn commit: r1571501 -
/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Author: stack
Date: Tue Feb 25 00:58:56 2014
New Revision: 1571501
URL: http://svn.apache.org/r1571501
Log:
HBASE-10556 Possible data loss due to non-handled DroppedSnapshotException for user-triggered flush from client/shell
Modified:
hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Modified: hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1571501&r1=1571500&r2=1571501&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue Feb 25 00:58:56 2014
@@ -94,6 +94,7 @@ import org.apache.hadoop.hbase.client.Re
import org.apache.hadoop.hbase.client.RowMutations;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
+import org.apache.hadoop.hbase.DroppedSnapshotException;
import org.apache.hadoop.hbase.exceptions.FailedSanityCheckException;
import org.apache.hadoop.hbase.exceptions.OperationConflictException;
import org.apache.hadoop.hbase.exceptions.OutOfOrderScannerNextException;
@@ -3782,6 +3783,13 @@ public class HRegionServer implements Cl
}
builder.setLastFlushTime(region.getLastFlushTime());
return builder.build();
+ } catch (DroppedSnapshotException ex) {
+ // Cache flush can fail in a few places. If it fails in a critical
+ // section, we get a DroppedSnapshotException and a replay of hlog
+ // is required. Currently the only way to do this is a restart of
+ // the server.
+ abort("Replay of HLog required. Forcing server shutdown", ex);
+ throw new ServiceException(ex);
} catch (IOException ie) {
throw new ServiceException(ie);
}