[
https://issues.apache.org/jira/browse/HBASE-8299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13636882#comment-13636882
]
Sergey Shelukhin commented on HBASE-8299:
-----------------------------------------
Thanks, great testing.
Do you intend to commit all the policies e.g. EverythingPolicy?
Didn't review them yet assuming you would only commit the best one.
Ok, I actually reviewed one accidentally.
For NoStuckBestRatio, if it gets committed:
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?
For both this and the NoStuckSmallest one:
{code}
if (files.size() < 2) {
return true;
}
{code}
The min size sanity check should ensure it's 2 or more. Should it do
precondition check?
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
;)
Nit^3 - the loop could actually just find the biggest file (it could be done in
the previous loop too), by definition it would have the biggest ratio. Doesn't
really matter.
There are some blank lines.
One test set was removed but nothing was added; need a couple new tests to
ensure it doesn't get broken?
> 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