perf(selfhost): default QUEUE_CONCURRENCY to 4 so PR bursts drain in parallel - #1480
Merged
Conversation
…parallel Review jobs are I/O-bound — GitHub API + AI awaits dominate wall time — so the serial default (QUEUE_CONCURRENCY=1) made a burst of N PRs take N times the slowest review back to back. Default to 4 overlapping job loops: SQLite's WAL + busy_timeout absorb the short serialized write windows, and the Postgres queue's FOR UPDATE SKIP LOCKED keeps claims race-free across the pool/replicas. QUEUE_CONCURRENCY=1 restores strict serial.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1480 +/- ##
=======================================
Coverage 95.44% 95.44%
=======================================
Files 194 194
Lines 21064 21064
Branches 7623 7623
=======================================
Hits 20104 20104
Misses 383 383
Partials 577 577
🚀 New features to boost your workflow:
|
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
Review jobs are I/O-bound (GitHub API + AI awaits dominate), but the queue defaulted to
QUEUE_CONCURRENCY=1— strict serial — so a burst of N PRs took N× the slowest review back-to-back. Default to 4 overlapping job loops.FOR UPDATE SKIP LOCKEDalready makes claims race-free across the pool and replicas.QUEUE_CONCURRENCY=1restores strict serial; documented in.env.example+ the self-hosting guide.Validation
npm run typecheck;npm run test:coverage— full suite green, no changed-line coverage gaps (existing concurrency=1/2 tests still pass; nothing asserted the old default).Roadmap item #3 (throughput).