circuit breaker with half open state#2634
Merged
Merged
Conversation
wwbmmm
reviewed
May 12, 2024
| "Maximum isolation duration in milliseconds"); | ||
| DEFINE_double(circuit_breaker_epsilon_value, 0.02, | ||
| "ema_alpha = 1 - std::pow(epsilon, 1.0 / window_size)"); | ||
| DEFINE_int32(circuit_breaker_half_open_window_size, 10, |
Contributor
There was a problem hiding this comment.
这个功能应该是可选的吧,比如half_open_window_size为0表示关闭该功能。默认为关闭,和之前的行为保持兼容。
zyearn
reviewed
May 26, 2024
| DEFINE_double(circuit_breaker_epsilon_value, 0.02, | ||
| "ema_alpha = 1 - std::pow(epsilon, 1.0 / window_size)"); | ||
| DEFINE_int32(circuit_breaker_half_open_window_size, 0, | ||
| "Half open window sample size."); |
|
谢谢,您的邮件我已收到!
|
Contributor
|
LGTM |
zyearn
reviewed
May 28, 2024
| + 1 == FLAGS_circuit_breaker_half_open_window_size) { | ||
| _half_open.store(false, butil::memory_order_relaxed); | ||
| _half_open_success_count.store(0, butil::memory_order_relaxed); | ||
| return true; |
Member
There was a problem hiding this comment.
Should we remove the return here and let this latency passed to _long_window/_short_window.OnCallEnd below instead?
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.
What problem does this PR solve?
Issue Number:
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: