HBASE-8282-User triggered flushes does not allow compaction to get triggered even if compaction criteria is met (Ram)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1484519 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
39e7e66ae9
commit
190aac3613
|
@ -1298,7 +1298,7 @@ public class HRegion implements HeapSize { // , Writable{
|
|||
* <p>This method may block for some time, so it should not be called from a
|
||||
* time-sensitive thread.
|
||||
*
|
||||
* @return true if cache was flushed
|
||||
* @return true if the region needs compacting
|
||||
*
|
||||
* @throws IOException general io exceptions
|
||||
* @throws DroppedSnapshotException Thrown when replay of hlog is required
|
||||
|
|
|
@ -3607,7 +3607,12 @@ public class HRegionServer implements ClientProtos.ClientService.BlockingInterfa
|
|||
}
|
||||
FlushRegionResponse.Builder builder = FlushRegionResponse.newBuilder();
|
||||
if (shouldFlush) {
|
||||
builder.setFlushed(region.flushcache());
|
||||
boolean result = region.flushcache();
|
||||
if (result) {
|
||||
this.compactSplitThread.requestCompaction(region,
|
||||
"Compaction through user triggered flush");
|
||||
}
|
||||
builder.setFlushed(result);
|
||||
}
|
||||
builder.setLastFlushTime(region.getLastFlushTime());
|
||||
return builder.build();
|
||||
|
|
Loading…
Reference in New Issue