Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2463

Removal of node and its recreation causes corruption in the session

    Details

      Description

      The following scenario causes a disparity between String path = node.getPath() and session.getNode(path).

      • Create a new session (session1)
      • Add 'testNode' as a child of root
      • Save the session
      • Logout of the session
      • Create a new session (session2)
      • Get the node at the path '/testNode'
      • Remove testNode
      • Re-add the node as a child of root (effectively restoring it but lets call it newTestNode for clarity), using rootNode.addNode('testNode')

      Observations:

      • Calling newTestNode.getPath() should return '/testNode' but in fact returns '/testNode[2]'
      • Calling session2.getNode('/testNode[2]') throws a PathNotFoundException
      • Calling session2.getNode('/testNode') returns the newTestNode

      It appears that the calculation for the newTestNode.getPath() is not correct for a mid-session use-case. Everything is sorted out if the session is saved after the removal and prior to the creation of newTestNode.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                phantomjinx Paul Richardson
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: