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

nxbincache only purged when server is restarted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7.10, 8.10, 9.10, 10.2
    • Fix Version/s: None
    • Component/s: Core, S3
    • Tags:
    • Backlog priority:
      700
    • Sprint:
      nxcore 10.10.4
    • Story Points:
      5

      Description

      1. install Nuxeo
      2. install S3 addon
      3. create a File document and upload a file to it
      4. check the tmp folder
      5. observe an nxbincache folder is present
      6. wait for some time, even an hour
      7. observe the file is still present
      8. stop Nuxeo
      9. observe the file has been purged from tmp folder

      Expected behavior: in production, some environments cannot be restarted on the sole purpose of cleaning the tmp folder. This should be done on-the-fly.
      Note: this is due to the nxbincache file being created as a JVM temporary file, thus deleted only when the JVM stops:
      https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core-api/src/main/java/org/nuxeo/ecm/core/blob/binary/CachingBinaryManager.java#L105
      using:
      https://github.com/nuxeo/nuxeo/blob/master/nuxeo-runtime/nuxeo-runtime/src/main/java/org/nuxeo/runtime/api/Framework.java#L612

      Also, the folder is declared as a LRU cache but checking the getSize method defined here:
      https://github.com/nuxeo/nuxeo/blob/master/nuxeo-common/src/main/java/org/nuxeo/common/file/LRUFileCache.java#L136
      it is never used except in testLRUFileCache:
      https://github.com/nuxeo/nuxeo/blob/master/nuxeo-common/src/test/java/org/nuxeo/common/file/TestLRUFileCache.java#L58

      So the max size is never evaluated.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 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
                  2d

                    PagerDuty

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