Skip to content

Commit

Permalink
Allow us to disable the global rate limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
fpacifici committed Aug 5, 2022
1 parent 588c25c commit a403170
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion snuba/web/db_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ def execute_query_with_rate_limits(
# This allows us not to borrow capacity from the global quota
# during the evaluation if one of the more specific limiters
# (like the project rate limiter) rejects the query first.
query_settings.add_rate_limit(get_global_rate_limit_params())
if state.get_config("enable_global_rate_limiter", 1):
query_settings.add_rate_limit(get_global_rate_limit_params())

# XXX: We should consider moving this that it applies to the logical query,
# not the physical query.
with RateLimitAggregator(
Expand Down

0 comments on commit a403170

Please sign in to comment.