HBASE-24846: Address compaction races in TestFIFOCompactionPolicy (#2203)

Looped through the test 100 times and it passes. Without the patch it fails
every ~10 runs or so.

Signed-off-by: Viraj Jasani <vjasani@apache.org>
Signed-off-by: Michael Stack <stack@apache.org>
This commit is contained in:
Bharath Vissapragada 2020-08-06 09:31:41 -07:00
parent 8ad59775c9
commit 1d65ad464f
No known key found for this signature in database
GPG Key ID: 18AE42A0B5A93FA7
1 changed files with 5 additions and 0 deletions

View File

@ -122,6 +122,11 @@ public class TestFIFOCompactionPolicy {
EnvironmentEdgeManager.injectEdge(ee); EnvironmentEdgeManager.injectEdge(ee);
Configuration conf = TEST_UTIL.getConfiguration(); Configuration conf = TEST_UTIL.getConfiguration();
conf.setInt(HStore.BLOCKING_STOREFILES_KEY, 10000); conf.setInt(HStore.BLOCKING_STOREFILES_KEY, 10000);
// Expired store file deletion during compaction optimization interferes with the FIFO
// compaction policy. The race causes changes to in-flight-compaction files resulting in a
// non-deterministic number of files selected by compaction policy. Disables that optimization
// for this test run.
conf.setBoolean("hbase.store.delete.expired.storefile", false);
TEST_UTIL.startMiniCluster(1); TEST_UTIL.startMiniCluster(1);
} }