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

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

+1 

This might also make sense for simplifying the {{ConflictHandler}} of the 
{{Root.rebase()}} operation.
                
> Add NodeState.compareAgainstBaseState()
> ---------------------------------------
>
>                 Key: OAK-171
>                 URL: https://issues.apache.org/jira/browse/OAK-171
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core
>            Reporter: Jukka Zitting
>            Priority: Minor
>
> The {{NodeStore.compare()}} method provides a common mechanism for comparing 
> any two node states, and we originally decided to put the method on the 
> {{NodeStore}} interface instead of on {{NodeState}} as for performance 
> reasons we may want to dispatch the actual diffing operation based on the 
> implementation of either one of the given {{NodeState}} instances.
> In practice it turns out that there's an important special case of this 
> operation, comparing a {{NodeState}} against an earlier version of it (i.e. a 
> base state), that is easy to dispatch based on just the modified state and is 
> used so often that keeping the separate {{NodeStore}} reference around for 
> the comparison operation tends to unnecessarily complicate relevant code.
> Thus I'd like to introduce a {{NodeState.compareAgainstBaseState()}} method 
> signature in {{oak-core}} for this specific case. We'd still keep the 
> {{NodeStore.compare()}} method around for more complicated diffing cases.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to