Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-30465

Fix temporary blob move to transient storage when parent folders are deleted by the GC

    Details

    • Release Notes Summary:
      Empty directories are not deleted from transient stores.
    • Backlog priority:
      900
    • Sprint:
      nxsupport 14

      Description

      Under heavy load, this scenario can be easily reproduced:

      1. upload blobs using the Batch upload manager
      2. the upload stores the blobs to the transient storage with a call to FileBlob#moveTo
      3. at the same time, the transient store GC deletes old blobs with the parent folders in the hierarchy
      4. deleting the parent folders make the moveFile fail because the complete destination path cannot be resolved
      5. It raises an error like
        2020-12-02T15:35:18,666 ERROR [http-nio-127.0.0.1-8080-exec-1684] [org.nuxeo.ecm.webengine.app.WebEngineExceptionMapper] org.nuxeo.ecm.core.api.NuxeoException: java.nio.file.NoSuchFileException: /nuxeo_data/nux_et_24610_tmp/nxblob-4784577703768182154.tmp -> /nuxeo_data/nuxeodata_transient_BatchManagerCache/data/d4/7c/d47c710e874524fdac9fb8551b9fef3f
        org.nuxeo.ecm.core.api.NuxeoException: java.nio.file.NoSuchFileException: /nuxeo_data/nux_et_24610_tmp/nxblob-4784577703768182154.tmp -> /nuxeo_data/nuxeodata_transient_BatchManagerCache/data/d4/7c/d47c710e874524fdac9fb8551b9fef3f
         at org.nuxeo.ecm.core.transientstore.keyvalueblob.KeyValueBlobTransientStore.putBlobs(KeyValueBlobTransientStore.java:493) ~[nuxeo-core-cache-10.10-HF21.jar:?]
         at org.nuxeo.ecm.automation.server.jaxrs.batch.Batch.addFile(Batch.java:185) ~[nuxeo-automation-server-10.10-HF27.jar:?]
         at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.addBlob(BatchUploadObject.java:323) ~[nuxeo-rest-api-server-10.10-HF27.jar:?]
         at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.uploadNoTransaction(BatchUploadObject.java:252) ~[nuxeo-rest-api-server-10.10-HF27.jar:?]
         at org.nuxeo.ecm.restapi.server.jaxrs.BatchUploadObject.upload(BatchUploadObject.java:183) ~[nuxeo-rest-api-server-10.10-HF27.jar:?]
        

        because "/nuxeo_data/nuxeodata_transient_BatchManagerCache/data/d4" does not exist any after the GC cleanup

      Possible fixes:

      1. never deletes empty folders by the transient store GC
      2. catch the NoSuchFileException error and create the missing folders to have a valid path (<= preferred one not to accumulate empty folders)

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.