[
https://issues.apache.org/jira/browse/HBASE-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13637002#comment-13637002
]
Elliott Clark commented on HBASE-8299:
--------------------------------------
bq.Do you intend to commit all the policies e.g. EverythingPolicy?
I don't think so. They are great to get a sense of what compactions could be
like. But they aren't really useful for any read users. So if anyone wanted
to use them as a benchmark then I would move those algorithms into the test
folders.
{quote}
When not stuck, the compactions are only judged based on selection size and
file size, foundRatio and bestRatio are never compared.
When stuck, the reverse is true, it chooses best ratio without regard to
selection size or file size. Is it intended?
{quote}
Yes this is intended. The thought was to keep the policy as close to
ExploringCompactionPolicy as possible. So if not stuck take the same set of
files that Exploring Compaction Policy would. If we are stuck take the set of
files that are the closest to being in ratio. This policy works really well if
there are giant spikes (see the last set of files created in the perf test).
bq.The min size sanity check should ensure it's 2 or more. Should it do
precondition check?
I'd much rather protect against a bug then try and prematurely optimize.
bq.Also nit^2 in this function - total size computed inside and outside in the
caller, could just pass it in. Too bad Java doesn't have out/pointer parameters
You brought this up last time. Without some profiling I'm not up for
optimizing this code. I don't think that it's needed at all. Readability is
worth a lot, especially in something that is as complex as our compactions have
become.
bq.Nit^3 - the loop could actually just find the biggest file
I'm not convinced that removing a division is worth the loss of clarity.
> 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, HBASE-8299-1.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