From 839ce8e5607a4796e1d742c4e73e93f5f602cef2 Mon Sep 17 00:00:00 2001 From: Bharath Vissapragada Date: Thu, 6 Aug 2020 09:31:41 -0700 Subject: [PATCH] HBASE-21905 (addendum): 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 Signed-off-by: Michael Stack --- .../regionserver/compactions/TestFIFOCompactionPolicy.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java index 3f9bc65fa7a..46b44a14f5f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/compactions/TestFIFOCompactionPolicy.java @@ -115,6 +115,11 @@ public class TestFIFOCompactionPolicy { EnvironmentEdgeManager.injectEdge(ee); Configuration conf = TEST_UTIL.getConfiguration(); 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); }