HBASE-23149 RatioBasedCompactionPolicy#shouldPerformMajorCompaction logic is not correct (#744)

Signed-off-by: Guangxu Cheng <guangxucheng@gmail.com>
This commit is contained in:
Jacky Lau 2019-10-24 16:56:48 +08:00 committed by Guangxu Cheng
parent f0999a16ee
commit 41f671336c
2 changed files with 2 additions and 2 deletions

View File

@ -105,8 +105,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;
}

View File

@ -120,7 +120,7 @@ public abstract class SortedCompactionPolicy extends CompactionPolicy {
* @return When to run next major compaction
*/
public long getNextMajorCompactTime(final Collection<StoreFile> filesToCompact) {
// default = 24hrs
// default = 7days
long ret = comConf.getMajorCompactionPeriod();
if (ret > 0) {
// default = 20% = +/- 4.8 hrs