Skip to content

Commit cbef704

Browse files
committed
feat(gax-grpc): remove maxResizeDelta validation and update javadoc
1 parent e61486f commit cbef704

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ public abstract class ChannelPoolSettings {
100100
* the pool better handle sudden bursts or spikes in requests by allowing it to scale up faster.
101101
* Regardless of this setting, the number of channels will never exceed {@link
102102
* #getMaxChannelCount()}.
103+
*
104+
* <p>Note: This value can be greater than {@link #getMaxChannelCount()}. The resizing logic
105+
* naturally clamps adjustments to never exceed the min or max channel bounds, so a larger delta
106+
* simply means the pool can reach its required size in fewer steps without risk of exceeding
107+
* bounds.
103108
*/
104109
public abstract int getMaxResizeDelta();
105110

@@ -190,9 +195,6 @@ public ChannelPoolSettings build() {
190195
s.getInitialChannelCount() > 0, "Initial channel count must be greater than 0");
191196
Preconditions.checkState(
192197
s.getMaxResizeDelta() > 0, "Max resize delta must be greater than 0");
193-
Preconditions.checkState(
194-
s.getMaxResizeDelta() <= s.getMaxChannelCount(),
195-
"Max resize delta cannot be greater than max channel count");
196198
return s;
197199
}
198200
}

0 commit comments

Comments
 (0)