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

Alex Parvulescu commented on OAK-4015:
--------------------------------------

one interesting thing: the {{monitor.tryEnter}} and {{monitor.tryEnterIf}} java 
docs say "This method disregards the fairness setting of this monitor.", but 
apparently {{commitSemaphore.tryAcquire}} also breaks fairness, so it's 
probably a fair change :)

I'm having some issues grasping this bit {{monitor.getOccupiedDepth() == 1}}, 
there must be something that escapes me, would you mind sharing?
{code}
    public void unlock() {
        if (monitor.getOccupiedDepth() == 1) {
            expedited.remove(currentThread());
        }
        monitor.leave();
    }
{code}


> Expedite commits from the compactor
> -----------------------------------
>
>                 Key: OAK-4015
>                 URL: https://issues.apache.org/jira/browse/OAK-4015
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segmentmk
>            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)

Reply via email to