Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ double AdmissionControlFilterConfig::aggression() const {

double AdmissionControlFilterConfig::successRateThreshold() const {
const double pct = sr_threshold_ ? sr_threshold_->value() : defaultSuccessRateThreshold;
// The threshold value should not be 0. Since you cannot add a validation on a widely used Runtime
// percent value, simply map a 0 percent for the field to the default success rate threshold.
if (pct == 0) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we instead throw during config ingest? (not here)

return defaultSuccessRateThreshold;
Comment thread
zasweq marked this conversation as resolved.
Outdated
}
return std::min<double>(pct, 100.0) / 100.0;
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.