fix(ci): cap bulk_snuba_queries thread pool to 4 under per-worker Snuba#114105
Closed
mchen-sentry wants to merge 1 commit into
Closed
fix(ci): cap bulk_snuba_queries thread pool to 4 under per-worker Snuba#114105mchen-sentry wants to merge 1 commit into
mchen-sentry wants to merge 1 commit into
Conversation
joshuarli
requested changes
Apr 28, 2026
f27ca58 to
4db337e
Compare
Per-worker Snuba in CI runs with CrossOrgQueryAllocationPolicy capped at 4 concurrent queries on the errors storage. The default ThreadPoolExecutor of 10 workers fans out wide enough to hit the policy and surface flakes (notably in backfill_supergroups_lightweight). Cap the pool to 4 when XDIST_PER_WORKER_SNUBA=1 so we never exceed the policy. Production keeps the wider pool of 10 since prod allocation thresholds are higher. Also updates docs/tiered-split-problems.md to note the PR breakdown.
4db337e to
1947ef0
Compare
Member
|
could we just change snubas rate limits in tests instead? |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
We're seeing flakes in backend tests using bulk_snuba_queries because the default thread pool of 10 fans out wider than Snuba's CrossOrgQueryAllocationPolicy on the errors storage allows (rejection_threshold=4 in CI). The 5th concurrent query gets rejected with RateLimitExceeded. Cap the pool to 4 when XDIST_PER_WORKER_SNUBA=1 so we never exceed the policy. Production keeps the wider pool of 10 since prod has higher thresholds.