Skip to content

Commit

Permalink
Merge pull request #2206 from murgatroid99/grpc-js_outlier_detection_…
Browse files Browse the repository at this point in the history
…ejection_percent_equal

grpc-js: Stop ejecting when current percent is equal to max
  • Loading branch information
murgatroid99 committed Aug 24, 2022
2 parents 1b2cf99 + 1d5801a commit df07da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/grpc-js/src/load-balancer-outlier-detection.ts
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit df07da3

Please sign in to comment.