HBASE-21097 Flush pressure assertion may fail in testFlushThroughputTuning
Amending-Author: Duo Zhang <zhangduo@apache.org> Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
fb54152e8c
commit
966e3751c2
|
@ -177,12 +177,18 @@ public class TestFlushWithThroughputController {
|
|||
.build());
|
||||
hbtu.waitTableAvailable(tableName);
|
||||
HRegionServer regionServer = hbtu.getRSForFirstRegionInTable(tableName);
|
||||
double pressure = regionServer.getFlushPressure();
|
||||
LOG.debug("Flush pressure before flushing: " + pressure);
|
||||
PressureAwareFlushThroughputController throughputController =
|
||||
(PressureAwareFlushThroughputController) regionServer.getFlushThroughputController();
|
||||
for (HRegion region : regionServer.getRegions()) {
|
||||
region.flush(true);
|
||||
}
|
||||
assertEquals(0.0, regionServer.getFlushPressure(), EPSILON);
|
||||
// We used to assert that the flush pressure is zero but after HBASE-15787 or HBASE-18294 we
|
||||
// changed to use heapSize instead of dataSize to calculate the flush pressure, and since
|
||||
// heapSize will never be zero, so flush pressure will never be zero either. So we changed the
|
||||
// assertion here.
|
||||
assertTrue(regionServer.getFlushPressure() < pressure);
|
||||
Thread.sleep(5000);
|
||||
boolean tablesOnMaster = LoadBalancer.isTablesOnMaster(hbtu.getConfiguration());
|
||||
if (tablesOnMaster) {
|
||||
|
|
Loading…
Reference in New Issue