archiva-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Stockhammer <marti...@apache.org>
Subject Fwd: Repository purge - (MRM-1958) Purge by retention count deletes files but leaves history on website.
Date Thu, 24 Aug 2017 06:48:03 GMT
Hi Olivier,

I'm working on this ticket and I'm not sure about some intents for the purge mechanism. The
metadata removal is not tested in the unit tests, so I'm trying to add some mock verifications
to check the removal of the artifacts in the metadata repository.
1.
In AbstractRepositoryPurge#purge there is a metadataRepo.removeProjectVersion at the top.
That seems strange, because that means that the project version is deleted even if there are
still artifacts in it.
And as I see #removeProjectVersion does a recursive removal.
2. There is a difference in the metadataRepo.removeArtifact for the cases with or without
classifier. The part with classifier does not use the baseversion for the project. And is
therefore not removed.

So am I right, that the intent is, to remove only the artifact that is requested and remove
the version only if all artifacts are deleted?
For 2. I think this is wrong and both should use baseversion for the project version.
If that's the case I will try to fix them both.

The code was introduced some time ago, so I'm not sure if you can say something about it.


Greetings

Martin




-------- Urspr√ľngliche Nachricht --------
Von: "Gregory Zyrek (JIRA)" <jira@apache.org>
Gesendet: 17. August 2017 09:50:01 MESZ
An: issues@archiva.apache.org
Betreff: [jira] [Commented] (MRM-1958) Purge by retention count deletes files but leaves history
on website.


    [ https://issues.apache.org/jira/browse/MRM-1958?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130063#comment-16130063
] 

Gregory Zyrek commented on MRM-1958:
------------------------------------

Hi Martin,

I'm using default jcr. 

Best regards,
Gregory

> Purge by retention count deletes files but leaves history on website.
> ---------------------------------------------------------------------
>
>                 Key: MRM-1958
>                 URL: https://issues.apache.org/jira/browse/MRM-1958
>             Project: Archiva
>          Issue Type: Bug
>          Components: indexing
>    Affects Versions: 2.2.3
>         Environment: CentOS 7, Docker 17.0.6
>            Reporter: Gregory Zyrek
>            Assignee: Martin Stockhammer
>            Priority: Minor
>              Labels: CI, beginner, features, github-import, newbie
>         Attachments: archiva_bug.png
>
>
> Hi,
> I'm having issue during repository purge based on retention count:
> redundant versions of snapshot are deleted from hard drive, but it's history still exists
in archiva portal. To be more precise there are links to version that currently don't exist
physically on drive with size 0b as it's shown on attached example screen. While on hard drive
with repository files there are only versions 2 and 3.
> I wonder if it's a configuration issue, or a code bug during purge? :) Would appreciate
any help with this. :)
> Best regards,
> Gregory



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


-- 
Diese Nachricht wurde von meinem Android-Gerät mit K-9 Mail gesendet.
Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message