[
https://issues.apache.org/jira/browse/OAK-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15326951#comment-15326951
]
Michael Dürig edited comment on OAK-4015 at 6/13/16 8:09 AM:
-------------------------------------------------------------
Not sure whether this is a good idea any more. The commit scheduler is a
concern of the higher level {{SegmentNodeStore}}. Accessing it directly from
the {{FileStore}} would break encapsulation. We should probably stick with a
lock based implementation as proposed here.
After all the refactorings of the past weeks the attached patch is void though:
compactor related commits are now directly applied at {{FileStore}} level and
do not involve the {{SegmentNodeStore}} any more. What we still can do is to
come up with a locking strategy in {{TarRevisions}} that prefers the compactor.
That is, the lock should not allow a new reader any more once a writer wants to
enter the lock. The {{ReentrantReadWriteLock}}, which is currently used does
most likely not behave like this.
was (Author: mduerig):
Not sure whether this is a good idea any more. The commit scheduler is a
concern of the higher level {{SegmentNodeStore}}. Accessing it directly from
the {{FileStore}} would break encapsulation. We should probably stick with a
lock based implementation as proposed here.
> 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
> Labels: compaction, gc, perfomance
> Fix For: 1.6
>
> 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)