Merge pull request #2206 from murgatroid99/grpc-js_outlier_detection_ejection_percent_equal

grpc-js: Stop ejecting when current percent is equal to max
This commit is contained in:
Michael Lumish 2022-08-24 15:27:40 -07:00 committed by GitHub
commit df07da3a02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -467,7 +467,7 @@ export class OutlierDetectionLoadBalancer implements LoadBalancer {
// Step 3
for (const [address, mapEntry] of this.addressMap.entries()) {
// Step 3.i
if (this.getCurrentEjectionPercent() > this.latestConfig.getMaxEjectionPercent()) {
if (this.getCurrentEjectionPercent() >= this.latestConfig.getMaxEjectionPercent()) {
break;
}
// Step 3.ii
@ -515,7 +515,7 @@ export class OutlierDetectionLoadBalancer implements LoadBalancer {
// Step 2
for (const [address, mapEntry] of this.addressMap.entries()) {
// Step 2.i
if (this.getCurrentEjectionPercent() > this.latestConfig.getMaxEjectionPercent()) {
if (this.getCurrentEjectionPercent() >= this.latestConfig.getMaxEjectionPercent()) {
break;
}
// Step 2.ii