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

[Direct Transfer] Remove void transfers on HTTP 404 error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.4.4
    • Fix Version/s: 4.4.4
    • Component/s: Direct Transfer

      Description

      Issue

      Scenario:

      • Start a Direct Transfer.
      • When all chunks are uploaded, and just after having called the FileManager operation: the network connection is lost.
      • The request being started, it has a 6 hours timeout.
      • But the document was created on the server because the call has been made.
      • Finally, after 6 hours, the network was restored in the meantime, but the FileManager will throw a 404 error because the batchId was already consumed.
      • The transfer will be displayed in the Direct Transfer window, but nothing more will be done.

      Here are revelant logs:

      2020-07-09 08:51:55 2972 13904 DEBUG    nuxeo.client       Response from 'https://nxdev-webui-11.beta.nuxeocloud.com/nuxeo/api/v1/upload/batchId-770b2560-6712-4db4-8d04-98b2b32bbddd/0/execute/FileManager.Import' [404]: '<no content>' with headers {...} and cookies <...>
      2020-07-09 08:51:55 2972 13904 WARNING  nxdrive.engine.processor The document or its parent does not exist anymore: <DocPair[43298] local_path=WindowsPath('C:/Users/rgrasland/Downloads/fichiers_drive/fichiers/50000/48966.txt'), local_parent_path=WindowsPath('.'), remote_ref='', local_state='direct', remote_state='unknown', pair_state='direct_transfer',>
      2020-07-09 08:51:55 2972 13904 DEBUG    nxdrive.engine.processor Soft unlocking WindowsPath('c:/users/rgrasland/downloads/fichiers_drive/fichiers/50000/48966.txt')
      2020-07-09 08:51:55 2972 13904 DEBUG    nxdrive.engine.dao.sqlite Released processor 13904
      2020-07-09 08:51:55 2972 13904 DEBUG    nxdrive.engine.workers Thread END
      

      And here is my understanding from the logs:

      02:51:55 call FileManager.Import
      02:51:59 network lost
      02:59:41 network again
      05:01:28 last file uploaded, 
      08:51:55 response from FileManager.Import
      

      The time between the call and the response is exactly 6 hours: this is the request timeout.

      Fix

      When the FileManager returns a 404 error, just remove void transfers, as it is done for sync items.

        Attachments

        1. image.png
          52 kB
          Mickaël Schoentgen

          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 - 30 minutes
                  30m