Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1207

Modifying a file overwrites event on its parent folder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.1.0
    • Component/s: Framework
    • Tags:
    • Sprint:
      nxDrive 10.2.5
    • Story Points:
      2

      Description

      This is reproducible with tests/test_nxdrive_903.py.

      Identified problem:
      The EngineDAO has the update_local_state() and the update_remote_state() method used by the local and remote watcher respectively. These methods can both modify the local_state, remote_state and pair_state of a document.
      Let’s say that the folder Folder1 has been renamed to Folder1-renamed remotely, the remote watcher will change its remote_state to modified.

      If the local watcher is handling a file File1 which is located in this folder, it will update the last_local_updated of its parent folder. When it started handling this file, the parent was seen as synchronized. In the update_local_modification_time() method, it will call update_local_state() and overwrite the remote_state to synchronized.
      Once the processor is called on Folder1, it sees the local_state and remote_state as synchronized and doesn’t perform the renaming event.

      Solution:
      Modify the update_local_modification_time() so that only the last_local_updated is updated in the Folder1 entry.

      Further work:
      We need a better isolation between the local and the remote watcher, to ensure no change is overwritten and unprocessed.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 days, 1 hour
                  2d 1h