Repository navigation
Conversation
It only limits queries with tenant_ids.cross_org_query set or a referrer in cross_org_referrer_limits. No config sets cross_org_referrer_limits, and cross_org_query is only set by the outcomes routing queries, which read storages the policy is not configured on, so it passes every query through.
…Policy Replace the four *_override param configs with key_by, which picks the tenant the concurrency count is kept for: tenant (default, today's bucket), organization or organization_referrer. Per-tenant limits go in match blocks as concurrent_limit. No override is set in any region today.
…licy Replace referrer_concurrent_override (param referrer) with concurrent_limit, the same name ConcurrentRateLimitAllocationPolicy uses. Per-referrer values go in match blocks. default_concurrent_request_per_referrer still applies when concurrent_limit is unset. The throttle threshold now follows the effective limit.
rate_limit_shard_factor is a per-policy config on every concurrency policy but is not set in any region. Remove the config and use 1.
…olicy It is ConcurrentRateLimitAllocationPolicy with query_type DELETE, but the delete path never loads policies from sentry-options and the resolver ignores query_type. Its only config entries (us and de search_issues reads) make it a second read-path concurrency limiter with its own Redis bucket. An unknown class name in config is skipped with a warning, so this and the config removal can deploy in either order.
ConcurrentRateLimitAllocationPolicy and ReferrerGuardRailPolicy each re-implemented the same count-check-end flow. BaseConcurrentRateLimitAllocationPolicy now runs it; subclasses supply the bucket and limit, which queries they skip, and how a decision becomes an allowance. Buckets, limits, explanations and decisions are unchanged.
This was referenced Oct 29, 2026
Member
Author
|
Combined into #8644. |
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.
Simplifies the concurrency policies. One commit per change.
No behaviour change with current config: none of the removed settings is set in any region, and the new
key_bydefault keeps today's Redis bucket, so no running count resets.CrossOrgQueryAllocationPolicy. It never limits a query: no config sets its referrer limits, and the only queries markedcross_org_queryread storages where it isn't configured. Also drops thecross_org_referrer_limitsschema property and comments claiming it gatesoutcomes_cross_org_hourly.ConcurrentRateLimitAllocationPolicy:key_by. Replaces four*_overrideparameterized settings.key_bypicks the tenant the count is kept for:tenant(default),organizationororganization_referrer. The organization buckets use the names the removed overrides used.ReferrerGuardRailPolicy:concurrent_limit. Replacesreferrer_concurrent_override, using the same name asConcurrentRateLimitAllocationPolicy. If unset,default_concurrent_request_per_referrerstill applies. The throttle threshold now follows the effective limit (same result for current config).rate_limit_shard_factorto 1. It is unset everywhere, and another value would move every count to new keys.DeleteConcurrentRateLimitAllocationPolicy. The delete path never loads it, so its only config entries (search_issuesin two regions) ran it on reads, as a second shadow limiter.BaseConcurrentRateLimitAllocationPolicyruns the count, check and release flow; subclasses supply hooks.ConcurrentRateLimitAllocationPolicystill releases pass-through-referrer queries;ReferrerGuardRailPolicyreleases with its real limit instead of a placeholder (the limit isn't read on release).key_byallowed as a string on policies.The resolver skips unknown policy names with a warning, so this can deploy before or after the config change. Replaces #8626, #8634, #8635, #8636, #8637, #8641.