We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 029dba5 commit 808fa66Copy full SHA for 808fa66
1 file changed
sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java
@@ -321,6 +321,9 @@ void resize() {
321
dampenedTarget = currentSize + (int) Math.copySign(settings.getMaxResizeDelta(), delta);
322
}
323
324
+ // We only count as "resized" if the thresholds are crossed and we actually attempt to scale.
325
+ // Checking (dampenedTarget != currentSize) would cause false positives when the pool is within
326
+ // bounds but not at the target, because the target aims for the middle of the bounds.
327
boolean resized = (localEntries.size() < minChannels || localEntries.size() > maxChannels);
328
if (resized) {
329
consecutiveResizes++;
0 commit comments