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

Michael Dürig commented on OAK-2879:
------------------------------------

This doesn't properly cancel diffing while busy inside a big sub-tree AFAICS. 
Maybe passing a {{Predicate}} into the diffs to determine the cancellation 
status would work better?

What is the idea re. {{CompactionStrategy#isDiskSpaceSufficient}}? Currently 
that method just returns true so compaction would never be cancelled. 

Finally I have some concerns regarding calling {{FileStore#size}}. I have seen 
this method contending the file store when called all too often. Do really need 
the current size? Can we call it less often? Otherwise we might be able 
minimise the lock in its implementation. 

> Compaction should check for required disk space before running
> --------------------------------------------------------------
>
>                 Key: OAK-2879
>                 URL: https://issues.apache.org/jira/browse/OAK-2879
>             Project: Jackrabbit Oak
>          Issue Type: Sub-task
>          Components: segmentmk
>            Reporter: Michael Dürig
>            Assignee: Francesco Mari
>              Labels: compaction, doc-impacting, gc, resilience
>             Fix For: 1.3.8
>
>         Attachments: OAK-2879-01.patch, OAK-2879-02.patch
>
>
> In the worst case compaction doubles the repository size while running. As 
> this is somewhat unexpected we should check whether there is enough free disk 
> space before running compaction and log a warning otherwise. This is to avoid 
> a common source of running out of disk space and ending up with a corrupted 
> repository. 



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

Reply via email to