Uploaded image for project: 'Archiva (Retired)'
  1. Archiva (Retired)
  2. MRM-662

Repo purge is not deleting artifacts in correct order

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.0
    • 1.0.1
    • repository scanning
    • None

    Description

      Looking at the repo purge code by # of days old and by retention count, and while the sorting is correct.. what's being purged isn't actually what is the older artifact, but rather, it is the artifact which is currently being consumed. Here's the part (in DaysOldRepositoryPurge) where this occurs:

      while( versions.iterator().hasNext() )
      {
      if ( countToPurge-- <= 0 )

      { break; }

      doPurgeAllRelated( artifactFile );
      }

      Note:

      • the artifactFile is the artifact currently being consumed by the repo purge
      • doPurgeAllRelated(..) deletes the artifact from the repo as well as all related files to it (ex. .sha1, .md5 files, etc.)

      So given the above behavior, if the repo scanner found artifact-1.1.2-20070427.065136-5.jar first before artifact-1.1.2-20070427.065136-2.jar.. then what would actually get deleted from the repo is artifact-1.1.2-20070427.065136-5.jar instead of the older artifact-1.1.2-20070427.065136-2.jar.

      Attachments

        Activity

          People

            oching Maria Odea B. Ching
            oching Maria Odea B. Ching
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: