fix(maintenance): bound search_clicks and lyrics_index, clear stale queue source #253

Open
yonlu wants to merge 1 commits from fix/249-unbounded-growth into main
Owner
commit issue
4e5c6b9f fix(maintenance): bound search_clicks and lyrics_index, clear stale queue source #249

Verification

  • go test ./backend/database/... ./backend/library/... ./backend/queue/... ./backend/playlist/... ./backend/maintenance/...
  • golangci-lint run .

Three small items: prune lyrics_index on track removal, age out
search_clicks via a daily janitor job, and drop the queue's
"Playing from" label when its source playlist is deleted.

Note: this branch and #246 both touch the orphan loop in
backend/library/library.go; merge #246 first and rebase this one.

Closes #249

| commit | issue | |---|---| | `4e5c6b9f` fix(maintenance): bound search_clicks and lyrics_index, clear stale queue source | #249 | ## Verification - `go test ./backend/database/... ./backend/library/... ./backend/queue/... ./backend/playlist/... ./backend/maintenance/...` - `golangci-lint run .` Three small items: prune `lyrics_index` on track removal, age out `search_clicks` via a daily janitor job, and drop the queue's "Playing from" label when its source playlist is deleted. Note: this branch and #246 both touch the orphan loop in `backend/library/library.go`; merge #246 first and rebase this one. Closes #249
yonlu added 1 commit 2026-09-09 14:23:36 +00:00
fix(maintenance): bound search_clicks and lyrics_index, clear stale queue source
CI / check (push) Skipped
CI / e2e (push) Skipped
CI / check (pull_request) Failing after 1m3s
CI / e2e (pull_request) Skipped
4e5c6b9f7a
Three unbounded or stale surfaces, each small on its own:

- lyrics_index rows were never pruned on track removal, so the FTS index
  grew forever. Delete the entry where the library search FTS entry is
  already deleted, on the orphan and RemoveFromLibrary paths.
- search_clicks had no ceiling; age out ranking rows after a retention
  window via a daily janitor job.
- queue.source_* kept a "Playing from X" label after its playlist was
  deleted. Drop the source when the queue's own playlist goes, wired
  through a playlist-service hook like Library.SetRemovalHooks.

Closes #249
Some required checks failed
CI / check (push) Skipped
Required
CI / e2e (push) Skipped
Required
CI / check (pull_request) Failing after 1m3s
Required
Details
CI / e2e (pull_request) Skipped
Required
Details
Some required checks were not successful.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/249-unbounded-growth:fix/249-unbounded-growth
git checkout fix/249-unbounded-growth
Sign in to join this conversation.