HBASE-2398 NPE in HLog.append when calling writer.getLength
git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@930129 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4cbfa4b594
commit
4503dbe136
|
@ -261,6 +261,8 @@ Release 0.21.0 - Unreleased
|
|||
different address/startcode than SCAN"
|
||||
HBASE-2361 WALEdit broke replication scope
|
||||
HBASE-2365 Double-assignment around split
|
||||
HBASE-2398 NPE in HLog.append when calling writer.getLength
|
||||
(Kannan Muthukkaruppan via Stack)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-1760 Cleanup TODOs in HTable
|
||||
|
|
|
@ -673,12 +673,6 @@ public class HLog implements HConstants, Syncable {
|
|||
|
||||
// sync txn to file system
|
||||
this.sync(isMetaRegion);
|
||||
|
||||
if (this.writer.getLength() > this.logrollsize) {
|
||||
if (listener != null) {
|
||||
listener.logRollRequested();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -729,9 +723,6 @@ public class HLog implements HConstants, Syncable {
|
|||
}
|
||||
// sync txn to file system
|
||||
this.sync(info.isMetaRegion());
|
||||
if (this.writer.getLength() > this.logrollsize) {
|
||||
requestLogRoll();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -840,6 +831,7 @@ public class HLog implements HConstants, Syncable {
|
|||
if (this.closed) {
|
||||
return;
|
||||
}
|
||||
boolean logRollRequested = false;
|
||||
if (this.forceSync ||
|
||||
this.unflushedEntries.get() >= this.flushlogentries) {
|
||||
try {
|
||||
|
@ -849,12 +841,17 @@ public class HLog implements HConstants, Syncable {
|
|||
syncOps++;
|
||||
this.forceSync = false;
|
||||
this.unflushedEntries.set(0);
|
||||
// TODO: HBASE-2401
|
||||
} catch (IOException e) {
|
||||
LOG.fatal("Could not append. Requesting close of hlog", e);
|
||||
requestLogRoll();
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
if (!logRollRequested && (this.writer.getLength() > this.logrollsize)) {
|
||||
requestLogRoll();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue