-
Notifications
You must be signed in to change notification settings - Fork 545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ingester circuit breaker deactivate() function #9743
Conversation
deactivate()
function
deactivate()
functioncb.active.Store(true) | ||
}) | ||
} | ||
|
||
func (cb *circuitBreaker) deactivate() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this PR basically adds a support to deactivate circuit breakers, but it doesn't actually deactivate them anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct -- I wanted to keep the changes small, so will add the invocation in another PR. The plan is to call it from https://github.com/grafana/mimir/blob/main/pkg/ingester/downscale.go when we change the read-only state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Log request type in circuit breaker state change messages * Test blocking reads if push circuit breaker is open * Add circuit breaker deactivate() * Don't set active state twice when initial delay is 0 * Log when breakers are activated/deactivated * Only log when actually changing circuit breaker state (cherry picked from commit 219f278) Co-authored-by: Patryk Prus <patryk@grafana.com>
What this PR does
Add a
deactivate()
method to the ingester circuit breakers to allow them to be disabled and re-enabled dynamically.Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.