ML-1: archive as not needed
This commit is contained in:
+13
@@ -4,6 +4,7 @@ title: 'Add default :limit to Maintenance orphan queries'
|
||||
status: To Do
|
||||
assignee: []
|
||||
created_date: '2026-04-20 08:44'
|
||||
updated_date: '2026-04-24 06:59'
|
||||
labels: []
|
||||
dependencies: []
|
||||
references:
|
||||
@@ -44,3 +45,15 @@ end
|
||||
- [ ] #1 Both functions apply a default limit when none is supplied
|
||||
- [ ] #2 Existing callers continue to override when they need a different value
|
||||
<!-- AC:END -->
|
||||
|
||||
## Final Summary
|
||||
|
||||
<!-- SECTION:FINAL_SUMMARY:BEGIN -->
|
||||
Closed as not-planned (YAGNI).
|
||||
|
||||
The proposed fix was to add a default `:limit` (e.g. 1000) to `get_artists_missing_musicbrainz_id/1` and `get_albums_missing_musicbrainz_id/1` in `lib/music_library/maintenance.ex` to defend against future unbounded call sites.
|
||||
|
||||
Assessment: the dataset ceiling is <5,000 records and <1,000 artists for the next 2-3 years. An unbounded scan of the `tracks` table grouped by artist/album JSON fields is well within acceptable cost for this size. Adding a default limit would silently cap results on a dataset that should never need capping, and the only current callers (`lib/mix/tasks/scrobble/audit.ex:127,149`) already invoke without `:limit` on purpose.
|
||||
|
||||
A follow-up could remove the `:limit` option entirely to simplify the API — not tracked here; revisit if the option starts causing confusion.
|
||||
<!-- SECTION:FINAL_SUMMARY:END -->
|
||||
Reference in New Issue
Block a user