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

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

Looks good. I like this approach as it simplifies reasoning about correctness. 
Could you add a bit of Javadoc clarifying the contracts and the invariants 
(e.g. wrt. the locks) and inline comments to the parts of the code that require 
it? E.g. the cleanup method had AFIR a couple of inline comments explaining how 
the readers are replaced with the cleaned readers. There should also be a note 
that {{TarFiles.newWriter()}} may only be called when holding the lock. Maybe 
we should even turn this into an assertion. 

> 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