[
http://jira.codehaus.org/browse/MRM-662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Maria Odea Ching updated MRM-662:
---------------------------------
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.
was:
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.
> 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
> 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