File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,15 @@ export class OutlierDetectionLoadBalancer implements LoadBalancer {
500
500
}
501
501
trace ( 'Running failure percentage check. threshold=' + failurePercentageConfig . threshold + ' request volume threshold=' + failurePercentageConfig . request_volume ) ;
502
502
// Step 1
503
- if ( this . addressMap . size < failurePercentageConfig . minimum_hosts ) {
503
+ let addressesWithTargetVolume = 0 ;
504
+ for ( const mapEntry of this . addressMap . values ( ) ) {
505
+ const successes = mapEntry . counter . getLastSuccesses ( ) ;
506
+ const failures = mapEntry . counter . getLastFailures ( ) ;
507
+ if ( successes + failures >= failurePercentageConfig . request_volume ) {
508
+ addressesWithTargetVolume += 1 ;
509
+ }
510
+ }
511
+ if ( addressesWithTargetVolume < failurePercentageConfig . minimum_hosts ) {
504
512
return ;
505
513
}
506
514
You can’t perform that action at this time.
0 commit comments