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 2016/09/08 11:40:20 UTC

[jira] [Commented] (OAK-4015) Expedite commits from the compactor

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

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

Turns out that a simple way to expedite commits from a compactor is to make the lock in {{TarRevisions}} fair and to add an option for expediting commits to {{TarRevisions.setHead(RecordId, RecordId, Option...)}}. If the option is set this method would use the write lock instead of the default read lock to set the head, which would cause the current commit to skip the queue of all readers waiting to acquire the lock.

Initial implementation: https://github.com/mduerig/jackrabbit-oak/tree/OAK-4015-exp

> Expedite commits from the compactor
> -----------------------------------
>
>                 Key: OAK-4015
>                 URL: https://issues.apache.org/jira/browse/OAK-4015
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>              Labels: compaction, gc, perfomance
>             Fix For: Segment Tar 0.0.12
>
>         Attachments: OAK-4015-histo.png, OAK-4015-wait-time.png
>
>
> Concurrent commits during compaction cause those to be re-compacted. Currently it seems that the compaction thread can end up waiting for some time to acquire the commit lock [1], which in turn causes more commits to pile up to be re-compacted. I think this could be improved by tweaking the lock such that the compactor could jump ahead of the queue. I.e. use a lock which can be acquired in expedited mode. 
> [1] SegmentNodeStore#commitSemaphore



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