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

Andrei Dulceanu commented on OAK-5046:
--------------------------------------

After carefully reading the code and all its implications, I think that 
deriving a simple solution is hard to achieve. Let me explain my idea:
* we want to get rid of everything involving the old compaction gain threshold, 
but properties like {{GAIN_THRESHOLD_DEFAULT}} are still to be kept
* although we want to switch to the new implementation, a property from the old 
one is used to make the decision of running the estimation, or not 
({{gainThreshold}}). Wouldn't it be clearer to add a separate member in 
{{SegmentGCOptions}}, a boolean like {{disableEstimation}} to make this 
decision?
* I don't know all the details behind, but having a threshold expressed as a 
percentage (the old compaction gain), seems more natural than having one based 
on a value in gigabytes. I think it's easier to say "run compaction when 
there's a 20% percent increase in repository size" than putting it "run 
compaction when there's an increase of 10GB in repository size". The latter 
might be a very small percentage for a huge repo. That's why I think it's hard 
to come up with some default value here.

To sum up my proposal is to go all the way and remove everything related to the 
old compaction gain, clarifying also the points above.

[~alexparvulescu], [~mduerig], WDYT?

> Remove the old estimation OSGi setting (compaction.gainThreshold)
> -----------------------------------------------------------------
>
>                 Key: OAK-5046
>                 URL: https://issues.apache.org/jira/browse/OAK-5046
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>    Affects Versions: 1.5.12
>            Reporter: Andrei Dulceanu
>            Assignee: Andrei Dulceanu
>            Priority: Minor
>              Labels: osgi-config
>             Fix For: 1.5.13
>
>         Attachments: OAK-5046-01.patch
>
>
> Currently, there are two implementations for finding out the gain in 
> repository size after running compaction: the old one, 
> {{CompactionGainEstimate}} and the new one, {{SizeDeltaGcEstimation}}. 
> Similarly, there are also two configurations for customising them, in 
> {{SegmentNodeStoreService}}, {{compaction.gainThreshold}} and 
> {{compaction.sizeDeltaEstimation}}.
> At the moment both of them are exposed as OSGi configurations, but only the 
> new one should be exposed (e.g. {{compaction.sizeDeltaEstimation}}). 
> It must be evaluated whether it makes sense to keep the logic associated with 
> the old implementation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to