You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2019/01/30 08:53:00 UTC
[jira] [Commented] (OAK-8014) Commits carrying over from previous
GC generation can block other threads from committing
[ https://issues.apache.org/jira/browse/OAK-8014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16755868#comment-16755868 ]
Michael Dürig commented on OAK-8014:
------------------------------------
Attached [^OAK-8014.patch] fixes the problem as it forces the deep copy to happen before acquiring the commit lock. It does *not* improve the time it takes for the save operation of the affected commit itself. Improving this needs optimising the hit rate of the deduplication caches. The patch should not have a negative impact otherwise as it only moves an operation forward and outside of the lock. That operation does not need to be protected by that lock as it does not involve any shared state. Moreover the operation is idempotent and executing it a second time inside the lock will not do anything (it bails out early).
[~frm], could you help me double checking this? I don't to plan to commit the patch as is though. Next steps are:
* Figure out how to implement the patch without breaking encapsulation of the {{Commit}} class.
* Figure out and implement regression testing covering the fix.
> Commits carrying over from previous GC generation can block other threads from committing
> -----------------------------------------------------------------------------------------
>
> Key: OAK-8014
> URL: https://issues.apache.org/jira/browse/OAK-8014
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Affects Versions: 1.10.0, 1.8.11
> Reporter: Michael Dürig
> Assignee: Michael Dürig
> Priority: Blocker
> Labels: TarMK
> Fix For: 1.8.12
>
> Attachments: OAK-8014.patch
>
>
> A commit that is based on a previous (full) generation can block other commits from progressing for a long time. This happens because such a commit will do a deep copy of its state to avoid linking to old segments (see OAK-3348). Most of the deep copying is usually avoided by the deduplication caches. However, in cases where the cache hit rate is not good enough we have seen deep copy operations up to several minutes. Sometimes this deep copy operation happens inside the commit lock of {{LockBasedScheduler.schedule()}}, which then causes all other commits to become blocked.
> cc [~rma61870@adobe.com], [~edivad]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)