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

Delete temporary files ASAP

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.0
    • Component/s: Infrastructure
    • Sprint:
      DevOps Sprint 4, DevOps Sprint 5
    • Story Points:
      4

      Description

      java.io.File.deleteOnExit() leaks temporary files until JVM shutdown. This is not acceptable for long time running code.
      Use org.nuxeo.runtime.api.Framework.trackFile(File, Object) to delete them ASAP.

      org.nuxeo.connect.update.task.update.UpdateManager.deleteOldFile(File, File, boolean)
      org.nuxeo.connect.update.task.standalone.commands.Delete.doRun(Task, Map<String, String>)
      org.nuxeo.cm.mail.actionpipe.ExtractMessageInformation.execute(ExecutionContext)
      org.nuxeo.ecm.webapp.clipboard.DocumentListZipExporter.exportWorklistAsZip(List<DocumentModel>, CoreSession, boolean)
      org.nuxeo.ecm.core.api.impl.blob.FileBlob.FileBlob(InputStream, String, String)
      org.nuxeo.common.file.LRUFileCache.getTempFile()
      org.nuxeo.ecm.core.api.impl.blob.FileBlob.readObject(ObjectInputStream)
      org.nuxeo.ecm.core.api.SerializableInputStream.readObject(ObjectInputStream)
      org.nuxeo.connect.update.task.update.UpdateManager.removeBackup(String)
      org.nuxeo.runtime.reload.NuxeoRestart.restart()
      org.nuxeo.connect.update.task.update.UpdateManager.rollbackBaseVersion(Entry, RollbackOptions)
      com.nuxeo.connect.test.TestConnectAdapters.testPackageAdapter()
      com.nuxeo.connect.packagerepository.PackageDocumentAdapter.updateMetaDataFromBlob(CoreSession, DocumentModel)

      Also check use of File.createTempFile:

      org.nuxeo.ecm.core.io.impl.TestImportExportWithComplexXSD

        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 - 1 hour Original Estimate - 1 hour
                  1h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 11 minutes
                  1h 11m