[ 
https://issues.apache.org/jira/browse/HBASE-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13627177#comment-13627177
 ] 

Sergey Shelukhin commented on HBASE-8299:
-----------------------------------------

I get that it needs to be fixed, but this fix affects the cases beyond the ones 
it's looking to solve, so I am looking for another, or modified, fix.

This fix changes the logic of requestCompaction to force compaction   every 
time it's called when needsCompaction is true, which is different from current 
behavior (and that for old default policy) where needsCompaction is an 
inaccurate pre-check and real decision is done in requestCompaction, which is 
called speculatively form many place. Changing semantics of requestCompaction 
like that will cause bad compactions in normal cases where compaction is not 
needed. 
Including bad consequences with many compactions (see compaction checker - how 
it runs compactions).
I am looking to avoid that.

The ways to avoid it that can be used are:
1) Keep this patch but add force flag/method which will trigger this  behavior 
of "select compaction regardless of ratio".
2) Change semantics of needsCompaction and requestCompaction across the code so 
that the assumption this patch makes is actually true.
3) Change the heuristic to not get stuck in such case via other means.

It seems that (1) is the simplest. 
                
> ExploringCompactionPolicy can get stuck in rare cases.
> ------------------------------------------------------
>
>                 Key: HBASE-8299
>                 URL: https://issues.apache.org/jira/browse/HBASE-8299
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.95.1
>            Reporter: Elliott Clark
>            Assignee: Elliott Clark
>         Attachments: HBASE-8299-0.patch
>
>
> If the files are very oddly sized then it's possible that 
> ExploringCompactionPolicy can get stuck.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to