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

Workspace move in concurrent environment causes inconsistencies

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • 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:
      None

      Description

      Attached is a test case that shows that using workspace move concurrent with other write operations causes inconsistencies.

      The problem is that unlike session move, workspace move operates on the local item state directly (session move operates on transient item state). When a concurrent modification occurs on for instance the source parent of the moved target the modification that the move operation was trying to do is overwritten as the changes from the concurrent session are pulled in:

      • on thread 1 a workspace.move is initiated on /folder1/node to /folder2/node, removing the child node entry from /folder1 a.o.t.
      • session 2 on thread 2 modifies and saves /folder1, overwriting the changes on the local item state of /folder1 in session 1
      • thread 1, still in the workspace move operation, sends the updates to the shared item state manager
      1. WorkspaceMoveTest.patch
        7 kB
        Unico Hommes
      2. JCR-3292.patch
        1 kB
        Unico Hommes

        Activity

        Unico Hommes created issue -
        Unico Hommes made changes -
        Field Original Value New Value
        Attachment WorkspaceMoveTest.patch [ 12522765 ]
        Unico Hommes made changes -
        Attachment JCR-3292.patch [ 12522845 ]
        Unico Hommes made changes -
        Description Attached is a test case that shows that using workspace move concurrent with other write operations causes inconsistencies.

        The problem is that unlike session move, workspace move operates on the local item state directly (session move operates on transient item state). When a concurrent modification occurs on for instance the source parent of the moved target the modification that the move operation was trying to do is overwritten as the changes from the concurrent session are pulled in:

        - on thread 1 a workspace.move is initiated on /folder1/node to /folder2/node, removing the child node entry from /folder1 a.o.t.
        - session 2 on thread 2 modifies and saves /folder1, overwriting the changes on the local item state of /folder1 in session 1
        - thread 1, still in the workspace move operation, sends the updates to the shared item state manager

        I don't see any easy fixes for this problem. Probably the design of the BatchedItemOperation needs to modified quite a bit.
        Attached is a test case that shows that using workspace move concurrent with other write operations causes inconsistencies.

        The problem is that unlike session move, workspace move operates on the local item state directly (session move operates on transient item state). When a concurrent modification occurs on for instance the source parent of the moved target the modification that the move operation was trying to do is overwritten as the changes from the concurrent session are pulled in:

        - on thread 1 a workspace.move is initiated on /folder1/node to /folder2/node, removing the child node entry from /folder1 a.o.t.
        - session 2 on thread 2 modifies and saves /folder1, overwriting the changes on the local item state of /folder1 in session 1
        - thread 1, still in the workspace move operation, sends the updates to the shared item state manager
        Unico Hommes made changes -
        Attachment JCR-3292.patch [ 12522845 ]
        Unico Hommes made changes -
        Attachment JCR-3292.patch [ 12522857 ]
        Bart van der Schans made changes -
        Assignee Bart van der Schans [ schans ]
        Bart van der Schans made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.12 [ 12319843 ]
        Fix Version/s 2.4.2 [ 12320366 ]
        Fix Version/s 2.6 [ 12319480 ]
        Resolution Fixed [ 1 ]
        Alex Parvulescu made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jukka Zitting made changes -
        Fix Version/s 2.5 [ 12319280 ]
        Fix Version/s 2.6 [ 12319480 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development