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

"Empty Trash" Tasks cleans the wrong directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Won't Fix
    • Affects Version/s: 2.14.1, 2.14.14
    • Fix Version/s: None
    • Component/s: Scheduled Tasks
    • Labels:
    • Environment:
      RHEL 7.6

      Description

      The "Empty Trash" scheduled task in Nexus 2.14.14-01 (OSS) does not delete the directory where the trash files are actually located.

      The "Remove Releases From Repository" tasks move the files to storage/<repositoryname>/.nexus/attributes/.nexus/trash . However, the "Empty Trash" task deltes the storage/<repositoryname>/.nexus/trash directory which is always empty.

      Here is an excerpt from the DEBUG log of the "Empty Trash" job (slightly redacted):

      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.sisu.goodies.eventbus.internal.DefaultEventBus - Event 'RepositoryItemEventRetrieve(sender="<Repository Name>" [id=<repository>], <repository>:/.nexus/trash)' fired
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.maven.maven2.M2Repository - <repository> retrieveItem() :: FOUND <repository>:/.nexus/trash/
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.maven.maven2.M2Repository - <repository>.list() :: <repository>:/.nexus/trash
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.maven.maven2.M2Repository - <repository>.list() :: <repository>:/.nexus/trash/.nexus
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.maven.maven2.M2Repository - <repository>.list() :: <repository>:/.nexus/trash/.nexus
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.storage.local.fs.DefaultFSPeer - Deleting file: /app/data/nexus/nexus-work/storage/<repository>/.nexus/trash/.nexus
      2020-02-20 12:48:25 DEBUG [pxpool-1-thread-14] <user> org.sonatype.nexus.proxy.walker.DefaultWalker - Finished walking on ResourceStore '<repository>' from path '/.nexus/trash/'.
      

      A similar Issue was reported in NEXUS-6648 and was marked as fixed for Version 2.13 .

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              sferstl Stefan Ferstl
              Last Updated By:
              Peter Lynch Peter Lynch
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title