jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-171) Add NodeState.compareAgainstBaseState()
Date Fri, 06 Jul 2012 15:55:35 GMT

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

Jukka Zitting commented on OAK-171:

Committed first version in revision 1358282.

bq. how should we handle the case where the base state is not available any more (i.e. OAK-114)?

I think the only reasonable solution there is to throw something like an {{IllegalStateException}}.
> 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


View raw message