Skip to content
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

Circuit breaker with dynamic settings #5867

Merged
merged 1 commit into from May 14, 2024

Conversation

rodrigozhou
Copy link
Contributor

What changed?

Circuit breaker with dynamic settings: it takes a function that is evaluated whenever Allow is called, and if any change happened, then it replaces the circuit breaker with the updated changes (previous state is lost). This makes possible to have the circuit breaker automatically update after a dynamic config change.

Added dynamic config for outbound queue circuit breaker.

Why?

Be able to config by destination.

How did you test it?

Potential risks

Documentation

Is hotfix candidate?

@rodrigozhou rodrigozhou requested a review from bergundy May 7, 2024 03:26
@rodrigozhou rodrigozhou requested a review from a team as a code owner May 7, 2024 03:26
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/outbound-queue-circuit-breaker-dc branch from 71f2501 to 6c8cb37 Compare May 7, 2024 03:26
common/circuitbreaker/circuitbreaker.go Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
common/dynamicconfig/constants.go Outdated Show resolved Hide resolved
common/dynamicconfig/constants.go Outdated Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/outbound-queue-circuit-breaker-dc branch 3 times, most recently from 5431523 to 9eea330 Compare May 13, 2024 17:08
common/circuitbreaker/circuitbreaker.go Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Show resolved Hide resolved
common/circuitbreaker/circuitbreaker.go Outdated Show resolved Hide resolved
service/history/outbound_queue_factory.go Outdated Show resolved Hide resolved
service/history/outbound_queue_factory.go Outdated Show resolved Hide resolved
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/outbound-queue-circuit-breaker-dc branch 2 times, most recently from a1b4dba to 3e38255 Compare May 14, 2024 15:00
@rodrigozhou rodrigozhou requested a review from bergundy May 14, 2024 15:01
@rodrigozhou rodrigozhou force-pushed the rodrigozhou/outbound-queue-circuit-breaker-dc branch from 3e38255 to 65f3af9 Compare May 14, 2024 15:59
@rodrigozhou rodrigozhou merged commit 5cd4f96 into main May 14, 2024
42 checks passed
@rodrigozhou rodrigozhou deleted the rodrigozhou/outbound-queue-circuit-breaker-dc branch May 14, 2024 17:44
ychebotarev pushed a commit to ychebotarev/temporal that referenced this pull request May 16, 2024
## What changed?
<!-- Describe what has changed in this PR -->
Circuit breaker with dynamic settings: it takes a function that is
evaluated whenever `Allow` is called, and if any change happened, then
it replaces the circuit breaker with the updated changes (previous state
is lost). This makes possible to have the circuit breaker automatically
update after a dynamic config change.

Added dynamic config for outbound queue circuit breaker.

## Why?
<!-- Tell your future self why have you made these changes -->
Be able to config by destination.

## How did you test it?
<!-- How have you verified this change? Tested locally? Added a unit
test? Checked in staging env? -->

## Potential risks
<!-- Assuming the worst case, what can be broken when deploying this
change to production? -->

## Documentation
<!-- Have you made sure this change doesn't falsify anything currently
stated in `docs/`? If significant
new behavior is added, have you described that in `docs/`? -->

## Is hotfix candidate?
<!-- Is this PR a hotfix candidate or does it require a notification to
be sent to the broader community? (Yes/No) -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants