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

Mete Atamel commented on OAK-565:
---------------------------------

I don't think we can omit the FetchHeadRevisionIdAction when the commit is for 
trunk. That's because mongoSync's headRevision is incremented for branch 
commits as well and when that happens, we don't want the CommitCommand to think 
that headRevision for trunk is higher than it actually is, that would throw off 
the "baseRevisionId < headRevisionId" check. But to double check, I changed to 
what you suggested, ran MongoMKBranchMergeTest and saw a few unnecessary 
rebases. So I think we need the FetchHeadRevisionIdAction even when the commit 
is for trunk.

FetchHeadRevisionIdAction used to just read headRevId in sync collection but we 
had to change it to account for branches as you already guessed. 
                
> CommitCommand readExistingNodes/mergeNodes called unnecessarily
> ---------------------------------------------------------------
>
>                 Key: OAK-565
>                 URL: https://issues.apache.org/jira/browse/OAK-565
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>            Reporter: Mete Atamel
>            Assignee: Mete Atamel
>            Priority: Minor
>         Attachments: commitcommandoptimization.patch
>
>
> CommitCommand/CommitCommandNew calls readExistingNodes and mergeNodes all the 
> time. Instead, it should only call these methods when the base revision id is 
> less than the head revision.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to