Project

Profile

Help

Issue #3016

closed

Removal of an Artifact leaves repo with associated artifactless Content forever

Added by ttereshc over 6 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 29
Quarter:

Description

Steps to reproduce:

  • create repo
  • create importer with immediate policy
  • sync
  • remove Artifact by its id, e.g. http://127.0.0.1:8000/api/v3/artifacts/0585cddf-0782-47b2-886b-ba08d2cad163/

Observe no records in pulp_app_artifact, pulp_app_contentartifact, pulp_app_remoteartifact for the deleted Artifact (because of ON_CASCADE delete).
All the Content-related tables stay untouched => repository claims to have all the content.
Key attributes of deleted Artifact are left in pulp_file_filecontent (path and digest).

I don't think that importer is expected to recover from this state with a subsequent sync (e.g. RemoreArtifact doesn't exist for the deleted Artifact, so if this content no longer exists in the upstream repo + sync mode is additive, this artifactless Content will remain in repo.

Workaround: explicitly delete related Content.

Also available in: Atom PDF