-
Type: Improvement
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: NoFixVersionApplicable
-
Fix Version/s: 4.3.0
-
Component/s: Direct Transfer
-
Epic Link:
-
Tags:
-
Sprint:nxDrive 11.1.20
-
Story Points:3
Scope
Before uploading anything, a check has to be done to prevent duplicates.
- By default, if the document does not exist: create a new document.
- If a document with the same name already exists on the server:
- if the document has a blob stored into the file:content xpath, asks the user for:
- upload cancellation;
- blob replacement.
- If the document has no attached blob (in case of a previous failure at the upload step):
- upload and attach the blob.
- if the document has a blob stored into the file:content xpath, asks the user for:
Possible Issue
Note about possible duplicate creation via a race condition client <-> server.
Given the local file with the path "$HOME/some-folder/subfolder/file.odt", the file name is "file.odt".
Scenario:
- Step 1: local, check for a doc with the path name "file.odt" => nothing returned, continuing;
- Step 2: server, a document with a path name set to "file.odt" is created;
- Step 3: local, create the document with the path name "file.odt".
Even if the elapsed time between steps 1 and 3 is really short, it may happen.
What can be done to prevent such scenario is not on the Nuxeo Drive side but on the server one.
For now, 2 options are possible but not qualified to be done in a near future:
- NXP-22959;
- create a new operation Document.GetOrCreate that ensures atomicity.
- is related to
-
NXP-22959 Add a mode to prevent duplicate documents
- Open
- is required by
-
NXDRIVE-1838 Allow for one time synchronization of a file (Direct Transfer)
- Resolved