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

Alex Parvulescu commented on OAK-4719:
--------------------------------------

I think the fix should preserve the old deletion mechanics:
{code}
if (!file.exists() || file.delete()) {
  log.debug("TarMK GC: Removed old file {}", file);
  iterator.remove();
} else {
  log.warn("TarMK GC: Failed to remove old file {}. Will retry later.", file);
}
{code}
Key diff being that if a file cannot be deleted for some reason, it will be 
left in the set and reattempted at a later phase.

> Marked files are not removed if compaction fails
> ------------------------------------------------
>
>                 Key: OAK-4719
>                 URL: https://issues.apache.org/jira/browse/OAK-4719
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>             Fix For: Segment Tar 0.0.12
>
>
> If compaction fails after the configured number of attempts, {{cleanup()}} is 
> called to remove TAR files that might contain garbage generated during the 
> compaction attempt. The files returned by this call are ignored, thus 
> preventing this garbage from being removed from the system.



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

Reply via email to