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:
Jean-Daniel Cryans 2012-02-17 19:45:45 +00:00
parent f45b59aa4d
commit 5b542b7921
1 changed files with 7 additions and 1 deletions

View File

@ -397,9 +397,15 @@ class MemStoreFlusher extends HasThread implements FlushRequester {
lock.lock();
}
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.getMetrics().addFlush(region.getRecentFlushInfo());
} catch (DroppedSnapshotException ex) {
// Cache flush can fail in a few places. If it fails in a critical