You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// The number of consecutive resize cycles to wait before logging a warning about repeated
88
-
// resizing.
89
-
// This is an arbitrary value chosen to detect repeated requests for changes (multiple continuous
90
-
// increase or decrease attempts) without being too sensitive.
87
+
// The number of consecutive resize cycles to wait before logging a warning about repeated resizing.
88
+
// This is an arbitrary value chosen to detect repeated requests for changes (multiple continuous increase or decrease attempts) without being too sensitive.
// Log warning only once when the threshold is reached to avoid spamming logs.
342
340
// Using == instead of >= ensures we don't log on every subsequent resize cycle.
343
341
if (consecutiveResizes == CONSECUTIVE_RESIZE_THRESHOLD) {
344
-
LOG.warning(
345
-
"Channel pool is repeatedly resizing. Consider adjusting `initialChannelCount` or `maxResizeDelta` to a more reasonable value. "
346
-
+ "See https://docs.cloud.google.com/java/docs/troubleshooting to enable logging and set `com.google.api.gax.grpc.ChannelPool.level=FINEST` to log the channel pool resize behavior.");
342
+
StringBuildersb = newStringBuilder();
343
+
sb.append("Channel pool is repeatedly resizing. ");
344
+
sb.append("Consider adjusting `initialChannelCount` or `maxResizeDelta` to a more reasonable value. ");
345
+
sb.append("See https://docs.cloud.google.com/java/docs/troubleshooting to enable logging ");
346
+
sb.append("and set `com.google.api.gax.grpc.ChannelPool.level=FINEST` to log the channel pool resize behavior.");
347
+
LOG.warning(sb.toString());
347
348
}
348
349
349
350
// Only resize the pool when thresholds are crossed
0 commit comments