Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-12004

File delete in Nexus 2.x should try a rename to trash before doing a copy/delete

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.2
    • Fix Version/s: None
    • Component/s: Repository
    • Labels:
      None

      Description

      When you delete a resource in Nexus via a DELETE request to /service/local/repositories/<repo-id>/content it ends up executing this:

      https://github.com/sonatype/nexus2-internal/blob/release-2.14.2-01/components/nexus-core/src/main/java/org/sonatype/nexus/proxy/storage/local/fs/DefaultFSPeer.java#L281

      Which ends up here:

      https://github.com/sonatype/nexus2-internal/blob/release-2.14.2-01/components/nexus-core/src/main/java/org/sonatype/nexus/util/file/DirSupport.java#L488

      This is going to be a slow operation on many file systems. One of the reasons we moved the trash directory under the storage directory was to make it possible to use a rename operation for moving files to trash. This REST resource should try a rename first, and only fall back to copy/delete if that fails.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            rseddon Rich Seddon
            Last Updated By:
            Peter Lynch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                tigCommentSecurity.panel-title