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

Stefan Egli commented on OAK-8623:
----------------------------------

+1, lgtm.

Noticed that {{ns2.updateClusterState();}} in 
{{collisionOnForeignOrphanedBranch()}} is not strictly necessary as this test 
actually expects a collision - but agree that it is a good thing to have it in 
the test as to having the same test setup in all 3 new tests.

Other than that, as already commented offline, I was thinking this patch 
entirely could be avoided if these stale branches would be removed as part of 
{{recover}}.  One could argue that long-term this would be the easier solution, 
as it would remove code from the merge/collision logic and thus make it easier 
to read/maintain. Having said that, the recover implementation might be a 
bigger task, so I agree that first going with the patch suggested here, then 
later doing it in recovery (and removing the logic introduced in this patch) is 
a valid approach as it is quicker to have a solution short-term.

> Improve collision handling performance
> --------------------------------------
>
>                 Key: OAK-8623
>                 URL: https://issues.apache.org/jira/browse/OAK-8623
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: documentmk
>            Reporter: Marcel Reutegger
>            Assignee: Marcel Reutegger
>            Priority: Major
>         Attachments: OAK-8623.patch
>
>
> The current collision handling on conflict in the DocumentNodeStore can be 
> rather expensive when there are old branch commits which were not merged.
> A commit that includes documents with old branch commits that have not been 
> merged will always attempt to set a collision marker on the commit root 
> document for those changes.
> While it is difficult to tell whether a branch commit will be merged at some 
> point, at least those branch commits that were created before the most recent 
> startup of a cluster node cannot be merged. The collision handling logic 
> could be improved to take the start time of a cluster node into account.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to