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

Add support for idempotent requests

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 5.1.1
    • Component/s: Framework
    • Release Notes Summary:
      Idempotent Requests
    • Release Notes Description:
      Hide

      In order to improve uploads resiliency, we introduced idempotent requests for several calls.
      Improvement thanks to such requests are no more duplicate creations or missings on the server when uploading lot of files; ensuring the app will not create duplicates after a hard crash; and more generally it will make the upload experience more fluid.

      As the performances impact is not yet known, we put the feature behind the use-idempotent-requests option, and it is disabled by default. We will work on benchmarks in coming weeks and if the feature is safe enough, it will be enabled by default in a future release.

      Show
      In order to improve uploads resiliency, we introduced idempotent requests for several calls. Improvement thanks to such requests are no more duplicate creations or missings on the server when uploading lot of files; ensuring the app will not create duplicates after a hard crash; and more generally it will make the upload experience more fluid. As the performances impact is not yet known, we put the feature behind the use-idempotent-requests option, and it is disabled by default. We will work on benchmarks in coming weeks and if the feature is safe enough, it will be enabled by default in a future release.
    • Tags:
    • Sprint:
      nxDrive 11.2.11, nxDrive 11.2.12, nxDrive 11.2.17
    • Story Points:
      2

      Description

      Introduction

      Since NXP-29978, there is a new HTTP header that is very useful for our usage of the FileManager in the Direct Transfer feature. Its name is Idempotency-Key and its value should be a uniq ID.

      As stated in TL-368, this will prevent unwanted duplicates creation and enforce upload resiliency.

      Scope

      • Add the new HTTP header for those requests:
        • NuxeoDrive.CreateFile (sync)
        • NuxeoDrive.UpdateFile (sync)
        • NuxeoDrive.AttachBlob (Direct Edit, but rarely used as it is only for Note s)
        • Blob.AttachOnDocument (Direct Edit)
        • FileManager.Import (Direct Transfer)
        • FileManager.CreateFolder (Direct Transfer)
      • Store the value in the database.
      • Add logic to handle calls made when a previous one is still running (the server will return a 409 conflict error).
      • Add tests.

        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 - 4 days
                  4d