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

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

Sorry for mixing things up on my end. I'd actually prefer to apply the initial 
patch (plus inlining of {{setHead()}}) and take the other two bullet points 
above into 2 separate issues. 

> Simplify merge logic in LockBasedScheduler
> ------------------------------------------
>
>                 Key: OAK-6074
>                 URL: https://issues.apache.org/jira/browse/OAK-6074
>             Project: Jackrabbit Oak
>          Issue Type: Task
>          Components: segment-tar
>            Reporter: Andrei Dulceanu
>            Assignee: Andrei Dulceanu
>            Priority: Minor
>             Fix For: 1.8, 1.7.3
>
>         Attachments: OAK-6074-02.patch, OAK-6074.patch
>
>
> The current logic for executing a commit in {{LockBasedScheduler}} is 
> unnecessarily intricate, containing separate strategies for optimistic and 
> pessimistic merges. While these would have made sense in a hierarchical, 
> multi-journal approach, when using a single journal file we always end up on 
> the optimistic merge branch, since a commit semaphore is acquired before 
> attempting to merge the commit. The proposal is to remove 
> {{LockBasedScheduler#optimisticMerge}} and 
> {{LockBasedScheduler#pessimisticMerge}} methods, simplifying the logic inside 
> {{LockBasedScheduler#execute}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to