-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
outlier: tooling for success rate ejection #618
Merged
Merged
Changes from 2 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
41f5a06
outlier: tooling for success rate ejection
ce8eb86
docs for admin port
edaf832
update
6ddc858
update
99df9b4
link
1f3ff02
Merge branch 'master' into outlier-sr-tooling
5953641
update
24cedc8
docs
84a8f97
update
b1e5845
return
3825f62
coverage
7d3f240
nit
08f1fcd
sentence
a401824
Merge branch 'master' into outlier-sr-tooling
0bd0487
comments
c103237
format
eaedc71
format
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -286,7 +286,6 @@ void DetectorImpl::processSuccessRateEjections() { | |
valid_success_rate_hosts.reserve(host_sinks_.size()); | ||
|
||
for (const auto& host : host_sinks_) { | ||
host.second->updateCurrentSuccessRateBucket(); | ||
// Don't do work if the host is already ejected. | ||
if (!host.first->healthFlagGet(Host::HealthFlag::FAILED_OUTLIER_CHECK)) { | ||
Optional<double> host_success_rate = | ||
|
@@ -296,6 +295,7 @@ void DetectorImpl::processSuccessRateEjections() { | |
valid_success_rate_hosts.emplace_back( | ||
HostSuccessRatePair(host.first, host_success_rate.value())); | ||
success_rate_sum += host_success_rate.value(); | ||
host.first->successRate(host_success_rate.value()); | ||
} | ||
} | ||
} | ||
|
@@ -317,6 +317,12 @@ void DetectorImpl::onIntervalTimer() { | |
|
||
for (auto host : host_sinks_) { | ||
checkHostForUneject(host.first, host.second, now); | ||
|
||
// Need to update the writer bucket to keep the data valid. | ||
host.second->updateCurrentSuccessRateBucket(); | ||
// Refresh host success rate stat for the /clusters endpoint. If there is a new valid value it | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. comma after the first sentence in the if sentence. |
||
// will get updated in processSuccessRateEjections(). | ||
host.first->successRate(-1); | ||
} | ||
|
||
processSuccessRateEjections(); | ||
|
This file contains 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
This file contains 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
This file contains 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
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.
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.
Both of these should come directly out of the outlier detector sink via here: https://github.com/lyft/envoy/blob/ce8eb8634f0c6aa24485e17fbd563ecc18d73982/include/envoy/upstream/host_description.h#L51
Don't add to host object.