jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (OAK-2124) Trigger compaction after restart to workaround issue due to long running JCR session
Date Tue, 16 Dec 2014 16:25:15 GMT

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

Michael Dürig resolved OAK-2124.
--------------------------------
    Resolution: Won't Fix

Resolving as won't fix as discussed.

> Trigger compaction after restart to workaround issue due to long running JCR session
> ------------------------------------------------------------------------------------
>
>                 Key: OAK-2124
>                 URL: https://issues.apache.org/jira/browse/OAK-2124
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segmentmk
>            Reporter: Chetan Mehrotra
>             Fix For: 1.2
>
>
> Due to OAK-2045 we cannot perform efficient compaction on a running system as of now.
To workaround that an alternative approach can be used
> # Regular maintainence job (invoked via RevisionGC MBean) if determines that compaction
would reclaim space above certain threshold then it sets a boolean flag under "compactionStatus"
to true along with timestamp
> # Post restart the maintainence job on detecting such a flag can trigger compaction and
cleanup
> Or in terms of pseudo code (by [~tmueller] )
> {noformat}
> // this is called once a day in a background thread
> dailyMaintenance() {
>     if (notSegmentNodeStore()) {
>         return;
>     }
>     // this needs to be stored somewhere in the repo
>     lastCompactStart = loadCompactStartFromRepo();
>     if (lastCompactStart > whenThisProcessWasStarted()) {
>         return;
>     }
>     // this can take about 1 minute
>     estimatedSpaceSaved = estimatedSpaceSavedByCompaction();
>     if (estimatedSpaceSaved < minimumSpaceSaved()) {
>         return;
>     }
>     storeLastCompactStartInRepo(now);
>     compact();
> }
> static long CLASS_LOADED_TIME = System.currentTimeMillis();
> whenThisProcessWasStarted() {
>     // a simplification, but maybe good enough
>     return CLASS_LOADED_TIME;
> }
> {noformat}



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

Mime
View raw message