HBASE-4028 Hmaster crashes caused by splitting log.
(gaojinchao via Ted Yu) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1139526 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
0b95330166
commit
a769d1e10d
|
@ -135,6 +135,8 @@ Release 0.91.0 - Unreleased
|
|||
(Vandana Ayyalasomayajula via Ted Yu)
|
||||
HBASE-4029 Inappropriate checking of Logging Mode in HRegionServer
|
||||
(Akash Ashok via Ted Yu)
|
||||
HBASE-4028 Hmaster crashes caused by splitting log.
|
||||
(gaojinchao via Ted Yu)
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack)
|
||||
|
|
|
@ -814,19 +814,20 @@ public class HLogSplitter {
|
|||
HLogKey key = entry.getKey();
|
||||
|
||||
RegionEntryBuffer buffer;
|
||||
long incrHeap;
|
||||
synchronized (this) {
|
||||
buffer = buffers.get(key.getEncodedRegionName());
|
||||
if (buffer == null) {
|
||||
buffer = new RegionEntryBuffer(key.getTablename(), key.getEncodedRegionName());
|
||||
buffers.put(key.getEncodedRegionName(), buffer);
|
||||
}
|
||||
long incrHeap = buffer.appendEntry(entry);
|
||||
totalBuffered += incrHeap;
|
||||
incrHeap= buffer.appendEntry(entry);
|
||||
}
|
||||
|
||||
// If we crossed the chunk threshold, wait for more space to be available
|
||||
synchronized (dataAvailable) {
|
||||
while (totalBuffered > maxHeapUsage && thrown == null) {
|
||||
totalBuffered += incrHeap;
|
||||
while (totalBuffered > maxHeapUsage && thrown.get() == null) {
|
||||
LOG.debug("Used " + totalBuffered + " bytes of buffered edits, waiting for IO threads...");
|
||||
dataAvailable.wait(3000);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue