ai-code-battle/cmd/acb-index-builder
jedarden 941f8bd2c9 fix(db): add LIMITs to unbounded queries to prevent OOM
- Add LIMIT 1000 to fetchChampionshipBracket (was unbounded)
- Reduce fetchSeries from LIMIT 5000 to LIMIT 1000
- Reduce fetchLineage from LIMIT 50000 to LIMIT 10000
- Reduce fetchFeedback from LIMIT 5000 to LIMIT 1000
- Reduce fetchRatingHistory from LIMIT 10000 to LIMIT 5000

The acb-index-builder pod has been in CrashLoopBackOff with OOMKill
(exit code 137) for 45 days with 4713 restarts. These unbounded queries
were loading too much data into memory, causing the kernel to kill the
process before any logs could be written.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-25 00:38:55 -04:00
..
blog.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
cards.go Implement S3 functions for R2/B2 integration in acb-index-builder 2026-03-29 09:09:29 -04:00
config.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
db.go fix(db): add LIMITs to unbounded queries to prevent OOM 2026-06-25 00:38:55 -04:00
deploy.go fix(db): add LIMITs to unbounded queries to prevent OOM 2026-06-25 00:38:55 -04:00
Dockerfile fix(index-builder): run wrangler from /app/web to pick up functions/ bundle 2026-04-30 12:39:57 -04:00
enrichment.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
enrichment_test.go fix(index-builder): correct series/season exempt queries, optimize playlist curation 2026-04-21 16:47:13 -04:00
generator.go feat(index-builder, evolver): improve evolution system initialization and logging 2026-05-26 13:28:44 -04:00
main.go Revert "fix(index-builder): promote recent replays from B2 to R2 warm cache" 2026-05-26 16:33:19 -04:00
main_test.go feat(index-builder): generate data/meta/index.json 2026-05-26 13:08:17 -04:00
narrative.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
narrative_test.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
rivalry_test.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
s3.go style: apply gofmt alignment fixes across codebase 2026-05-24 10:40:33 -04:00
s3_test.go docs(plan): update ZoneShrinkStep from 2 to 1 to match implementation 2026-05-26 08:22:27 -04:00
sitebuild.go fix(types): add missing ReplayPlayer import and type annotation for transcript feature 2026-04-22 18:20:56 -04:00
sitebuild_test.go fix(types): add missing ReplayPlayer import and type annotation for transcript feature 2026-04-22 18:20:56 -04:00