ListenBrainz top-recordings-for-artist answers 401 and is retried for every artist #284

Open
opened 2026-10-06 02:40:30 +00:00 by yonlu · 1 comment
Owner

Every call to https://api.listenbrainz.org/1/popularity/top-recordings-for-artist/<mbid> now answers 401:

$ curl -s -o /dev/null -w '%{http_code}\n' https://api.listenbrainz.org/1/popularity/top-recordings-for-artist/6f2f87e7-3ce9-4f1c-81dd-6f068a78cf26
401

backend/explore/searchindex.go fetchTopRecordings (and listenbrainz.go:70) call it without a token for every artist the search-index builder visits. In one minute of a dev run against a real library, .dev/app.log logged it 399 times. Each is a wasted rate-limited request and a log line, and the recordings half of the index is never filled.

Expected: a 401 is treated as an answer — stop asking for the session (or send a token if the user has one), record it, and do not retry per artist.

Every call to `https://api.listenbrainz.org/1/popularity/top-recordings-for-artist/<mbid>` now answers **401**: ``` $ curl -s -o /dev/null -w '%{http_code}\n' https://api.listenbrainz.org/1/popularity/top-recordings-for-artist/6f2f87e7-3ce9-4f1c-81dd-6f068a78cf26 401 ``` `backend/explore/searchindex.go` `fetchTopRecordings` (and `listenbrainz.go:70`) call it without a token for every artist the search-index builder visits. In one minute of a dev run against a real library, `.dev/app.log` logged it 399 times. Each is a wasted rate-limited request and a log line, and the recordings half of the index is never filled. Expected: a 401 is treated as an answer — stop asking for the session (or send a token if the user has one), record it, and do not retry per artist.
yonlu self-assigned this 2026-10-06 02:40:47 +00:00
yonlu added the
Status
In Progress
label 2026-10-06 02:40:48 +00:00
Author
Owner

Plan 023 (scoped library payloads), in order 279 → 281 → 280 → 282, then 283 and 284. Measured before/after with make perf against the bulk seed.

Plan 023 (scoped library payloads), in order 279 → 281 → 280 → 282, then 283 and 284. Measured before/after with make perf against the bulk seed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: yonlu/yellowjacket#284