HBASE-709 Deadlock while rolling WAL-log while finishing flush

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@671711 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-06-26 03:29:02 +00:00
parent e00d548bcc
commit b33ad41da3
2 changed files with 11 additions and 12 deletions

View File

@ -67,6 +67,7 @@ Hbase Change Log
HBASE-701 Showing bytes in log when should be String
HBASE-702 deleteall doesn't
HBASE-704 update new shell docs and commands on help menu
HBASE-709 Deadlock while rolling WAL-log while finishing flush
IMPROVEMENTS

View File

@ -393,23 +393,21 @@ public class HLog implements HConstants {
try {
this.writer.append(logKey, logEdit);
} catch (IOException e) {
LOG.error("Could not append to log. Opening new log. Exception: ", e);
rollWriter();
try {
this.writer.append(logKey, logEdit);
} catch (IOException e2) {
LOG.fatal("Could not append to log the second time because " +
e2.toString() + ", aborting.");
throw e2;
}
LOG.fatal("Could not append. Requesting close of log", e);
requestLogRoll();
throw e;
}
this.numEntries++;
}
}
if (this.numEntries > this.maxlogentries) {
if (listener != null) {
listener.logRollRequested();
}
requestLogRoll();
}
}
private void requestLogRoll() {
if (this.listener != null) {
this.listener.logRollRequested();
}
}