Repository navigation
fix(circuit-breaker): Allow requests when the quota check fails - #131296
Merged
Starrao123 merged 1 commit intoNov 16, 2026
Merged
Conversation
should_allow_request already lets traffic through when it can't read the breaker state. The quota check that runs next had no error handling, so a Redis error there reached the caller. For Seer grouping that fails save_event and the event is lost. Refs INFRENG-883
Starrao123
marked this pull request as ready for review
November 16, 2026 17:10
markstory
approved these changes
Nov 16, 2026
Starrao123
deleted the
vinayakrao/infreng-880-circuit-breaker-fail-open
branch
November 16, 2026 19:56
Starrao123
added a commit
that referenced
this pull request
Nov 16, 2026
… when redis fails (#131364) `CircuitBreaker.record_error` and `record_success` now log and return when their Redis calls fail, as the state read and write already do. Callers run these while handling their own request, so a Redis error replaced their result. Seer similarity raised instead of returning no matches, and the API gateway proxy and `gpu_crash` raised instead of returning their fallback. If the trip-log read fails after the breaker decides to trip, it still trips. An error or success that fails to write isn't counted. Enforcement doesn't change, since `should_allow_request` already lets requests through when Redis fails (#131296).
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.
Refs INFRENG-883
CircuitBreaker.should_allow_requestnow lets the request through when its quota check can't reach Redis, as it already does when the state read fails.The quota check had no error handling, so a Redis error reached the caller. In Seer similarity grouping that fails
save_eventand the event is lost, which happened 3 times in US in the last 90 days. We're moving theratelimitercluster these breakers use to Valkey, and the cutover makes these errors more likely.This applies to every
CircuitBreakeruser, not only Seer.Tests:
pytest tests/sentry/utils/test_circuit_breaker2.py