Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27648

Introduce directory disposal service

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      Jenkins discards directories that are not needed any longer all the time. Aside from the fact it is subject of different random failures (on windows, on NFS, etc.), it is also a time consuming operation.

      Instead of deleting such files synchronously, I propose to create Jenkins-wide service where directories can be registered for later disposal. The service will rename the directory so it will appear deleted immediately and delete the renamed one later.

      Similar approach is implemented in Workspace cleanup plugin though the solution leaks renamed directories in case the deletion fails.

      Such service will track registered directories even after the deletion failed and retry as many times as necessary or possibly report to admin that there is a problem Jenkins itself cannot handle despite repeated attempts.

      There are several areas that can benefit from this aside from Workspace cleanup. though, I am not sure if this behaviour should replace what FilePath#deleteRecursive currently does.

        Attachments

          Issue Links

            Activity

            Show
            olivergondza Oliver Gondža added a comment - https://github.com/jenkinsci/jenkins/pull/1636
            Hide
            olivergondza Oliver Gondža added a comment -

            This appears to be unnecessarily complicated.

            Show
            olivergondza Oliver Gondža added a comment - This appears to be unnecessarily complicated.
            Hide
            danielbeck Daniel Beck added a comment -

            FWIW this could be interesting if we ever move to a 'Recycle Bin'/delayed deletion model for deleting builds/jobs.

            Show
            danielbeck Daniel Beck added a comment - FWIW this could be interesting if we ever move to a 'Recycle Bin'/delayed deletion model for deleting builds/jobs.
            Hide
            olivergondza Oliver Gondža added a comment - - edited

            Daniel Beck, I have seen UI threads timeout deleting jobs while waiting on FS. Which is something my PR would address.

            Show
            olivergondza Oliver Gondža added a comment - - edited Daniel Beck , I have seen UI threads timeout deleting jobs while waiting on FS. Which is something my PR would address.

              People

              Assignee:
              olivergondza Oliver Gondža
              Reporter:
              olivergondza Oliver Gondža
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: