Skip to content

chore(gax-grpc): Update the ChannelPool warning message to point to the Gax Channel Pool guide#12930

Merged
lqiu96 merged 1 commit intomainfrom
link-channel-pool-guide
Apr 24, 2026
Merged

chore(gax-grpc): Update the ChannelPool warning message to point to the Gax Channel Pool guide#12930
lqiu96 merged 1 commit intomainfrom
link-channel-pool-guide

Conversation

@lqiu96
Copy link
Copy Markdown
Member

@lqiu96 lqiu96 commented Apr 24, 2026

No description provided.

@lqiu96 lqiu96 changed the title chore: Update the ChannelPool warning message to point to the Gax Channel Pool guide chore(gax-grpc): Update the ChannelPool warning message to point to the Gax Channel Pool guide Apr 24, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the CHANNEL_POOL_CONSECUTIVE_RESIZING_WARNING message in ChannelPool.java to include a new documentation link and clarify the resizing threshold. Feedback was provided regarding the length of the warning string, which exceeds the 100-character line limit, suggesting a multi-line approach for better readability.

+ "Consider adjusting `initialChannelCount` or `maxResizeDelta` to a more reasonable value. "
+ "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.";
"The gRPC ChannelPool used in the client has been flagged to be repeatedly resizing (5+ times). See https://github.com/googleapis/google-cloud-java/blob/main/docs/grpc_channel_pool_guide.md for more information about this behavior.";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The warning message string is very long (over 200 characters), which hinders readability and violates the standard 100-character line limit. While long URLs are sometimes allowed to exceed the limit, the preceding and following text should be wrapped. Additionally, per repository rules, prefer using StringBuilder for multi-line string concatenations in Java, as it is generally more performant than using the + operator.

Suggested change
"The gRPC ChannelPool used in the client has been flagged to be repeatedly resizing (5+ times). See https://github.com/googleapis/google-cloud-java/blob/main/docs/grpc_channel_pool_guide.md for more information about this behavior.";
new StringBuilder()
.append("The gRPC ChannelPool used in the client has been flagged to be repeatedly ")
.append("resizing (5+ times). See ")
.append("https://github.com/googleapis/google-cloud-java/blob/main/docs/grpc_channel_pool_guide.md ")
.append("for more information about this behavior.")
.toString();
References
  1. Each line of text is limited to 100 characters. While there is an exception for long URLs, the surrounding text should be wrapped to keep the code readable. (link)
  2. Prefer StringBuilder for multi-line string concatenations in Java, especially when performance is a consideration, as it is generally more performant than using the + operator.

@lqiu96 lqiu96 requested a review from jinseopkim0 April 24, 2026 19:22
@sonarqubecloud
Copy link
Copy Markdown

@sonarqubecloud
Copy link
Copy Markdown

@lqiu96 lqiu96 marked this pull request as ready for review April 24, 2026 20:10
@lqiu96 lqiu96 requested a review from a team as a code owner April 24, 2026 20:10
@lqiu96 lqiu96 merged commit 6f3a96b into main Apr 24, 2026
171 checks passed
@lqiu96 lqiu96 deleted the link-channel-pool-guide branch April 24, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants