Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Image Soft/Hard Delete APIs #3617

Open
jopemachine opened this issue Feb 10, 2025 — with Lablup-Issue-Syncer · 0 comments
Open

Implement Image Soft/Hard Delete APIs #3617

jopemachine opened this issue Feb 10, 2025 — with Lablup-Issue-Syncer · 0 comments
Assignees

Comments

@jopemachine
Copy link
Member

Motivation

  • A new approach to deletion is needed to distinguish between soft delete (setting status to deleted) and hard delete (physically removing the record).
  • The existing ForgetImageById might need to be retired or repurposed to align with the new design.

Required Features

  • Deprecate or replace ForgetImageById to avoid confusion.
  • Introduce a soft delete mutation (e.g., SoftDeleteImageById) that changes the status to deleted.
  • Implement a separate purge mutation (e.g., PurgeImageById) that permanently removes the image record from the database.

Impact  

  • Existing systems relying on ForgetImageById must either migrate to the new soft delete logic or call purge if they need a permanent removal.
  • The database cleanup process now differentiates between soft and hard deletions.

Testing Scenarios  

  • Invoke soft delete and verify that the status of the targeted image changes to deleted.
  • Attempt operations (e.g., rescan) on deleted images and confirm the expected behavior (e.g., they should be ignored).
  • Invoke hard delete (purge) and confirm that the record is fully removed from the database.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant