Skip to content

perf(indexer): cap aggregate score update cadence#935

Open
raymondjacobson wants to merge 1 commit into
mainfrom
codex/aggregate-score-cadence
Open

perf(indexer): cap aggregate score update cadence#935
raymondjacobson wants to merge 1 commit into
mainfrom
codex/aggregate-score-cadence

Conversation

@raymondjacobson

Copy link
Copy Markdown
Member

Summary

  • add a 10 minute pause between full aggregate score update passes
  • keep shutdown responsive to context cancellation

Evidence

  • production read-replica pg_stat_statements showed the aggregate score batch query as the top total-time read-path statement: ~39.5M calls, ~13.4M total seconds, ~340ms mean
  • live pg_stat_activity showed core-indexer actively running the same user-score batch query after the read replica drain
  • the old loop immediately started another full pass after each full scan, so this bounds repeated read load without changing scoring semantics

Test

  • go test ./indexer ./jobs -count=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant