Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-3289

Remove operation right after move operation causes missing child inconsistency


    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.2.11, 2.4
    • Fix Version/s: 2.2.12, 2.4.2, 2.5
    • Component/s: None
    • Labels:


      The scenario is as follows:
      1. Session s1 does a move operation on node /folder1/node to destination /folder2/node
      2. Session s2 does a remove operation on node /folder1/node
      3. Session s1 is saved
      4. Session s2 is saved

      A consistency check shows that /folder2 has a child node entry for inexistent child node node.

      The problem is that step 4. should fail whereas it doesn't.

      This is caused by the fact that the ItemSaveOperation.removeTransientItems puts the overlayed state of the transient state in the changelog instead of the transient state itself. But the overlayed state has the updated modcount of the previous move operation. Therefore when the shared item state manager persists the changelog it doesn't detect that the remove was done on a stale item and so the update can succeed.

      Attached is a patch containing a testcase that reproduces the inconsistency with this scenario.

      Another patch is for the ItemSaveOperation class which fixes the issue.

      1. MoveRemoveTest.patch
        3 kB
        Unico Hommes
      2. ItemSaveOperation.patch
        1 kB
        Unico Hommes



          • Assignee:
            Bart van der Schans
            Unico Hommes
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: