[ 
http://jira.codehaus.org/browse/MRM-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_121227
 ] 

Maria Odea Ching commented on MRM-662:
--------------------------------------

Added test for the order of deletion of artifacts in 
RetentionCountRepositoryPurge (-r615120)

The RetentionCountRepositoryPurge is already deleting artifacts correctly, 
based on the test case I've added.

> Repo purge is not deleting artifacts in correct order
> -----------------------------------------------------
>
>                 Key: MRM-662
>                 URL: http://jira.codehaus.org/browse/MRM-662
>             Project: Archiva
>          Issue Type: Bug
>          Components: repository scanning
>    Affects Versions: 1.0
>            Reporter: Maria Odea Ching
>            Assignee: Maria Odea Ching
>            Priority: Critical
>
> 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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to