jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Commented] (OAK-171) Add NodeState.compareAgainstBaseState()
Date Fri, 06 Jul 2012 14:05:33 GMT

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

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

On a related note: how should we handle the case where the base state is not available any
more (i.e. OAK-114)? 
                
> 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

       

Mime
View raw message