Orphan-Media garbage collection #134
Labels
No labels
kind
bug
kind
enhancement
wayfinder
grilling
wayfinder
map
wayfinder
prototype
wayfinder
research
wayfinder
task
workflow
needs-info
workflow
needs-triage
workflow
ready-for-agent
workflow
ready-for-human
workflow
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rosa/vernier#134
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Orphan-Media garbage collection
Deferred from #131. Media has a lifecycle independent of Posts (ADR-0017 / #131):
removing or replacing a Post's Photo drops the reference but leaves the Media,
and a Media may be referenced by zero Posts. Cascade only fires at the User
boundary (
ON DELETE CASCADE). So orphaned Media — never referenced, or leftbehind by a Photo removal/replacement — accumulates and is not collected.
Why deferred: safe deletion needs to know a Media isn't referenced by any
Post (and stays that way), which is real bookkeeping; premature hard-delete risks
breaking a still-referenced image. Tolerating orphans keeps deletes safe in v1.
Signal to revisit: orphan volume becoming a meaningful share of DB size, or a
quota (#deferred) needing to reclaim space.
Deferred: orphan-Media garbage collectionto Orphan-Media garbage collection