jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-2020) NodeState view at given version is not stable with DocumentNodeStore
Date Mon, 11 Aug 2014 07:43:12 GMT

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

Chetan Mehrotra commented on OAK-2020:

>Does it need to be the same object, or would it be enough if it's a different object,
but the same hash code, and NodeState.equals(..) would return true?

Need not be same Java reference. Key thing required is that they should have same lastRevision
as the DocumentNodeState equals relies on that and whats being observed here is that lastRevision
changes when same Node at same version is fetched at later point in time

    public boolean equals(Object that) {
        if (this == that) {
            return true;
        } else if (that instanceof DocumentNodeState) {
            DocumentNodeState other = (DocumentNodeState) that;
            if (getPath().equals(other.getPath())) {
                return lastRevision.equals(other.lastRevision);
        } ...


> NodeState view at given version is not stable with DocumentNodeStore
> --------------------------------------------------------------------
>                 Key: OAK-2020
>                 URL: https://issues.apache.org/jira/browse/OAK-2020
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: mongomk
>            Reporter: Chetan Mehrotra
>             Fix For: 1.1
> DocumentNodeStore should provide same NodeState for given (path, revision)  whenever
a NodeState is obtained from it. This fails in some cases if the Node cache in DocumentNodeStore
gets overflown and then the NodeState returned differs. This causes issues like
> # Spurious Commits see - Some commit would fails with conflicts in paths which were not
modified in that commit
> # Diff logic would traverse those paths which are not related to changes done in that
> More details would be provided in comments below

This message was sent by Atlassian JIRA

View raw message