chore(api): bump etl to include slug-collision route index (#337)#912
Open
raymondjacobson wants to merge 1 commit into
Open
chore(api): bump etl to include slug-collision route index (#337)#912raymondjacobson wants to merge 1 commit into
raymondjacobson wants to merge 1 commit into
Conversation
Pulls go-openaudio 43606e8, which adds migration 0031 indexing track_routes/playlist_routes on (owner_id, title_slug, collision_id). This makes the per-upload slug-collision MAX(collision_id) lookup an index-only scan instead of a full per-owner route scan, cutting the multi-second Track/Playlist tail in core-indexer. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
github.com/OpenAudio/go-openaudioand.../pkg/etlfrom5d2e19a(#901) to43606e8to consume go-openaudio #337.That change adds ETL migration
0031, which indexestrack_routesandplaylist_routeson(owner_id, title_slug, collision_id). Slug-collision resolution runsSELECT MAX(collision_id) … WHERE owner_id AND title_slugon every track/playlist create + rename; today that's a full per-owner route scan (prod EXPLAIN: ~16k-row bitmap heap scan on every upload for a prolific owner), which is the multi-second Track (7.8s) / Playlist (44s) tail incore-indexer. The new index makes it an index-only lookup.core-indexerruns this vendoredaudius/apiimage, so this bump is required to ship #337 to prod.Changes
go.mod/go.sum: both go-openaudio modules →v1.3.1-0.20260604005215-43606e8d8e5aMigration 0031 builds the indexes non-concurrently (single-transaction migration runner), taking an
ACCESS EXCLUSIVElock ontrack_routes(~2M rows / 493 MB) on indexer boot. To avoid stalling route writes on deploy, pre-build them in prod first —IF NOT EXISTSthen makes the migration a no-op (same pattern used to recover the 0030 indexes):Test plan
go mod tidy— only go.mod/go.sum changedgo build ./...passes0031present in the resolved module🤖 Generated with Claude Code