HBASE-10556 Possible data loss due to non-handled DroppedSnapshotException for user-triggered flush from client/shell
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1571501 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1ec190a792
commit
64740a5c07
|
@ -94,6 +94,7 @@ import org.apache.hadoop.hbase.client.Result;
|
|||
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 ClientProtos.ClientService.BlockingInterfa
|
|||
}
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue