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

Francesco Mari commented on OAK-6052:
-------------------------------------

While the structure pointed to by {{readers}} is immutabile, the reference 
{{readers}} is not itself immutable. The lock needs to protect both {{readers}} 
and {{writers}} because those two pointers need to be updated together (e.g. in 
{{TarFiles#newWriter}}). Moreover, when reading, a lock must be held to read 
{{readers}} and {{writer}} together, to prevent an inconsistent state to be 
propagated to the callers of {{TarFiles}}.

> Cleanup blocks writers
> ----------------------
>
>                 Key: OAK-6052
>                 URL: https://issues.apache.org/jira/browse/OAK-6052
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Francesco Mari
>              Labels: cleanup, gc
>             Fix For: 1.7.0, 1.8
>
>
> The refactoring from OAK-6002 moved the cleanup of the tar readers into the 
> read lock, which blocks concurrent writers from progressing. This was a 
> problem with {{oak-segment}} before and fixed with OAK-3329.
> As cleanup can take up to a couple of minutes on busy system we should 
> re-establish the former behaviour. 



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

Reply via email to