Skip to content

Commit 947fad5

Browse files
committed
docs(gax-grpc): add comment explaining resize delta clamping in staticallySized
1 parent 068887e commit 947fad5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPoolSettings.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ public static ChannelPoolSettings staticallySized(int size) {
139139
.setMaxRpcsPerChannel(Integer.MAX_VALUE)
140140
.setMinChannelCount(size)
141141
.setMaxChannelCount(size)
142+
// Maintain backwards compatibility by using default delta (2).
143+
// For static size 1, clamp to avoid validation failure (delta <= max channels).
144+
// Since static pools don't resize, this value doesn't affect operation.
142145
.setMaxResizeDelta(Math.min(DEFAULT_MAX_RESIZE_DELTA, size))
143146
.build();
144147
}

0 commit comments

Comments
 (0)