[ 
https://issues.apache.org/jira/browse/HBASE-26365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaolin Ha resolved HBASE-26365.
--------------------------------
    Resolution: Won't Fix

This is a big behavior change. Reopen if someone is interested in this.

> Limit min size of stripe and L0 files compaction
> ------------------------------------------------
>
>                 Key: HBASE-26365
>                 URL: https://issues.apache.org/jira/browse/HBASE-26365
>             Project: HBase
>          Issue Type: Improvement
>          Components: Compaction
>    Affects Versions: 3.0.0-alpha-1, 2.0.0
>            Reporter: Xiaolin Ha
>            Assignee: Xiaolin Ha
>            Priority: Major
>
> In the StripeCompactPolicy#needsSingleStripeCompaction, it only checks if the 
> file count is up to the min compaction limit.
> {code:java}
> protected boolean needsSingleStripeCompaction(StripeInformationProvider si) {
>   int minFiles = this.config.getStripeCompactMinFiles();
>   for (List<HStoreFile> stripe : si.getStripes()) {
>     if (stripe.size() >= minFiles) return true;
>   }
>   return false;
> }
> {code}
> When select files in stripe by 
> ExploringCompactionPolicy#applyCompactionPolicy, there is no min size limit 
> too.
> {code:java}
> // Sanity checks
> if (potentialMatchFiles.size() < minFiles) {
>   continue;
> }
> if (potentialMatchFiles.size() > maxFiles) {
>   continue;
> }
> // Compute the total size of files that will
> // have to be read if this set of files is compacted.
> long size = getTotalStoreSize(potentialMatchFiles);
> // Store the smallest set of files.  This stored set of files will be used
> // if it looks like the algorithm is stuck.
> if (mightBeStuck && size < smallestSize) {
>   smallest = potentialMatchFiles;
>   smallestSize = size;
> }
> if (size > comConf.getMaxCompactSize(mayUseOffPeak)) {
>   continue;
> }
> ++opts;
> if (size >= comConf.getMinCompactSize()
>     && !filesInRatio(potentialMatchFiles, currentRatio)) {
>   continue;
> }{code}
> While we should also limit the min size of compaction for stripes, because 
> small stripe compactions will occupy the compaction queue.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to