From b6b4cd40cd3b81147fd164ab5337587c91954174 Mon Sep 17 00:00:00 2001 From: Guangxu Cheng Date: Tue, 7 Nov 2017 18:18:57 +0800 Subject: [PATCH] HBASE-19199 RatioBasedCompactionPolicy#shouldPerformMajorCompaction() always return true when only one file needs to compact Signed-off-by: tedyu --- .../regionserver/compactions/RatioBasedCompactionPolicy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java index 98f87e61a53..dba0473419e 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/compactions/RatioBasedCompactionPolicy.java @@ -106,8 +106,8 @@ public class RatioBasedCompactionPolicy extends SortedCompactionPolicy { } else { LOG.debug("Major compaction triggered on store " + regionInfo + "; time since last major compaction " + (now - lowTimestamp) + "ms"); + result = true; } - result = true; } return result; }