artist_metadata is classified Swept but never swept #248

Open
opened 2026-09-09 13:57:39 +00:00 by yonlu · 1 comment
Owner

Report

artist_metadata is classified Cache, Swept in the datamap — "swept
when the artist is no longer referenced" — but no sweep exists and no
DELETE FROM artist_metadata appears anywhere in the tree. It is a
long-lived enrichment store (no TTL by design), so rows accumulate for
the life of the install.

Findings

  • backend/datamap/datamap.go:128 declares Cache, Swept.
  • The only references are the read/write in backend/explore/cache.go:137,161.
  • The maintenance runner (backend/app.go:777-790) registers
    http_cache, cover files, artist images and the proxy cache — nothing
    for artist_metadata.

Direction

Either add a sweep (keyed on artist_metadata.mbid no longer being
referenced by a library artist or any artist_images/artist_enrichment
row) or, if it is meant to stay, reclassify it Retained and give it a
ceiling like http_cache/browsedArtBudget — a year-long entity cache
without a bound is exactly the leak httpCacheBudget exists to stop.

**Report** `artist_metadata` is classified `Cache, Swept` in the datamap — "swept when the artist is no longer referenced" — but no sweep exists and no `DELETE FROM artist_metadata` appears anywhere in the tree. It is a long-lived enrichment store (no TTL by design), so rows accumulate for the life of the install. **Findings** - `backend/datamap/datamap.go:128` declares `Cache, Swept`. - The only references are the read/write in `backend/explore/cache.go:137,161`. - The maintenance runner (`backend/app.go:777-790`) registers `http_cache`, cover files, artist images and the proxy cache — nothing for `artist_metadata`. **Direction** Either add a sweep (keyed on `artist_metadata.mbid` no longer being referenced by a library artist or any `artist_images`/`artist_enrichment` row) or, if it is meant to stay, reclassify it `Retained` and give it a ceiling like `http_cache`/`browsedArtBudget` — a year-long entity cache without a bound is exactly the leak `httpCacheBudget` exists to stop.
yonlu self-assigned this 2026-09-09 13:58:14 +00:00
yonlu added the
Status
In Progress
label 2026-09-09 13:58:14 +00:00
Author
Owner

Branch: fix/248-artist-metadata-sweep

Approach: add a janitor job that deletes artist_metadata rows whose mbid is no longer a library artist nor referenced by artist_images/artist_enrichment, and register it. Decision to record: sweep (keep Swept) versus reclassify Retained with a budget — pick sweep if the owned-artist query is cheap, else a size budget like http_cache.

Branch: fix/248-artist-metadata-sweep Approach: add a janitor job that deletes artist_metadata rows whose mbid is no longer a library artist nor referenced by artist_images/artist_enrichment, and register it. Decision to record: sweep (keep Swept) versus reclassify Retained with a budget — pick sweep if the owned-artist query is cheap, else a size budget like http_cache.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#248