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

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

I think these references are missing as the set of bulk references passed to 
{{TarFiles.cleanup()}} is not necessarily consistent with the set of readers 
the latter cleans later on: if a new {{TarReader}} is created after collecting 
the bulk references in {{GarbageCollector.cleanup()}} that {{TarReader}} is 
also cleaned in {{TarFiles.cleanup()}} but its references are missing from the 
set of bulk references and thus erroneously gc'ed.

As a fix we could move collecting the bulk references into the lock inside 
{{TarFiles.cleanup()}}.

Pre OAK-6002 revisions are not affected as there the bulk references and the 
tar readers for cleaning are collected within the file store lock. 

> Include references from unpersisted segments when running cleanup
> -----------------------------------------------------------------
>
>                 Key: OAK-6046
>                 URL: https://issues.apache.org/jira/browse/OAK-6046
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>    Affects Versions: 1.8
>            Reporter: Francesco Mari
>            Assignee: Francesco Mari
>         Attachments: OAK-6046-01.patch, OAK-6046-02.patch
>
>
> If a data segment A that is not persisted references a bulk segment B that is 
> already persisted, and if A is the only segment that references B, B is 
> marked for removal during cleanup.
> To solve this problem, references from A should be included in the initial 
> set of references that is fed as input to the cleanup operation.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to