HBASE-5393 Consider splitting after flushing
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1245727 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f45b59aa4d
commit
5b542b7921
|
@ -397,9 +397,15 @@ class MemStoreFlusher extends HasThread implements FlushRequester {
|
||||||
lock.lock();
|
lock.lock();
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if (region.flushcache()) {
|
boolean shouldCompact = region.flushcache();
|
||||||
|
// We just want to check the size
|
||||||
|
boolean shouldSplit = region.checkSplit() != null;
|
||||||
|
if (shouldSplit) {
|
||||||
|
this.server.compactSplitThread.requestSplit(region);
|
||||||
|
} else if (shouldCompact) {
|
||||||
server.compactSplitThread.requestCompaction(region, getName());
|
server.compactSplitThread.requestCompaction(region, getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
server.getMetrics().addFlush(region.getRecentFlushInfo());
|
server.getMetrics().addFlush(region.getRecentFlushInfo());
|
||||||
} catch (DroppedSnapshotException ex) {
|
} catch (DroppedSnapshotException ex) {
|
||||||
// Cache flush can fail in a few places. If it fails in a critical
|
// Cache flush can fail in a few places. If it fails in a critical
|
||||||
|
|
Loading…
Reference in New Issue