From 1d5801aa90784746809d3f7e10c9693d919bdc3f Mon Sep 17 00:00:00 2001 From: Michael Lumish Date: Wed, 24 Aug 2022 14:54:09 -0700 Subject: [PATCH] grpc-js: Stop ejecting when current percent is equal to max --- packages/grpc-js/src/load-balancer-outlier-detection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/grpc-js/src/load-balancer-outlier-detection.ts b/packages/grpc-js/src/load-balancer-outlier-detection.ts index a799e5b0..bf7a72f8 100644 --- a/packages/grpc-js/src/load-balancer-outlier-detection.ts +++ b/packages/grpc-js/src/load-balancer-outlier-detection.ts @@ -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