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

Removal of node and its recreation causes corruption in the session

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Critical
    • 4.3.0.Final, 3.8.x-prod-ip6.3
    • 4.2.0.Final
    • API
    • None

    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.

      Attachments

        Activity

          People

            hchiorean Horia Chiorean (Inactive)
            parichar@redhat.com Paul Richardson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: