Skip to content

Commit f62aa0c

Browse files
committed
chore: Add a comment to explain the resize delta logic in static size
1 parent 947fad5 commit f62aa0c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,8 @@ 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.
142+
// Static pools don't resize so this value doesn't affect operation. However,
143+
// validation still checks that resize delta doesn't exceed channel pool size.
145144
.setMaxResizeDelta(Math.min(DEFAULT_MAX_RESIZE_DELTA, size))
146145
.build();
147146
}

0 commit comments

Comments
 (0)