HBASE-644 DroppedSnapshotException but RegionServer doesn't restart

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@660366 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-05-27 04:17:52 +00:00
parent a2a8dfbd8a
commit c37590cd99
3 changed files with 11 additions and 12 deletions

View File

@ -22,6 +22,7 @@ Hbase Change Log
HBASE-589 Remove references to deprecated methods in Hadoop once
hadoop-0.17.0 is released
HBASE-638 Purge \r from src
HBASE-644 DroppedSnapshotException but RegionServer doesn't restart
IMPROVEMENTS
HBASE-559 MR example job to count table rows

View File

@ -170,12 +170,10 @@ class Flusher extends Thread implements FlushRequester {
// 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.
// the server. Abort because hdfs is probably bad (HBASE-644 is a case
// where hdfs was bad but passed the hdfs check).
LOG.fatal("Replay of hlog required. Forcing server restart", ex);
if (!server.checkFileSystem()) {
return false;
}
server.stop();
server.abort();
return false;
} catch (IOException ex) {
LOG.error("Cache flush failed" +

View File

@ -631,12 +631,13 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
/**
* Sets a flag that will cause all the HRegionServer threads to shut down
* in an orderly fashion. Used by unit tests and called by Flusher
* if it judges server needs to be restarted.
* in an orderly fashion. Used by unit tests.
*/
public synchronized void stop() {
public void stop() {
this.stopRequested.set(true);
notifyAll(); // Wakes run() if it is sleeping
synchronized(this) {
notifyAll(); // Wakes run() if it is sleeping
}
}
/**
@ -645,7 +646,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
* Used unit testing and on catastrophic events such as HDFS is yanked out
* from under hbase or we OOME.
*/
public synchronized void abort() {
public void abort() {
this.abortRequested = true;
stop();
}
@ -1385,8 +1386,7 @@ public class HRegionServer implements HConstants, HRegionInterface, Runnable {
FSUtils.checkFileSystemAvailable(fs);
} catch (IOException e) {
LOG.fatal("Shutting down HRegionServer: file system not available", e);
this.abortRequested = true;
this.stopRequested.set(true);
abort();
fsOk = false;
}
}