Skip to content

Commit 1d5801a

Browse files
committed
grpc-js: Stop ejecting when current percent is equal to max
1 parent 1b2cf99 commit 1d5801a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/grpc-js/src/load-balancer-outlier-detection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ export class OutlierDetectionLoadBalancer implements LoadBalancer {
467467
// Step 3
468468
for (const [address, mapEntry] of this.addressMap.entries()) {
469469
// Step 3.i
470-
if (this.getCurrentEjectionPercent() > this.latestConfig.getMaxEjectionPercent()) {
470+
if (this.getCurrentEjectionPercent() >= this.latestConfig.getMaxEjectionPercent()) {
471471
break;
472472
}
473473
// Step 3.ii
@@ -515,7 +515,7 @@ export class OutlierDetectionLoadBalancer implements LoadBalancer {
515515
// Step 2
516516
for (const [address, mapEntry] of this.addressMap.entries()) {
517517
// Step 2.i
518-
if (this.getCurrentEjectionPercent() > this.latestConfig.getMaxEjectionPercent()) {
518+
if (this.getCurrentEjectionPercent() >= this.latestConfig.getMaxEjectionPercent()) {
519519
break;
520520
}
521521
// Step 2.ii

0 commit comments

Comments
 (0)