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:59:29 UTC
svn commit: r1571502 -
/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Author: stack
Date: Tue Feb 25 00:59:28 2014
New Revision: 1571502
URL: http://svn.apache.org/r1571502
Log:
HBASE-10556 Possible data loss due to non-handled DroppedSnapshotException for user-triggered flush from client/shell
Modified:
hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java?rev=1571502&r1=1571501&r2=1571502&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java (original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java Tue Feb 25 00:59:28 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;
@@ -3751,6 +3752,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);
}