HBASE-23149 RatioBasedCompactionPolicy#shouldPerformMajorCompaction logic is not correct (#744)
Signed-off-by: Guangxu Cheng <guangxucheng@gmail.com>
This commit is contained in:
parent
f0999a16ee
commit
41f671336c
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue