Skip to content

fix: Channel resize logic in to respect configured channel bounds#12863

Open
lqiu96 wants to merge 31 commits intomainfrom
fix/channelpool-logic-fix
Open

fix: Channel resize logic in to respect configured channel bounds#12863
lqiu96 wants to merge 31 commits intomainfrom
fix/channelpool-logic-fix

Conversation

@lqiu96
Copy link
Copy Markdown
Member

@lqiu96 lqiu96 commented Apr 20, 2026

No description provided.

lqiu96 and others added 20 commits April 17, 2026 17:09
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 introduces a configurable maxResizeDelta to the ChannelPoolSettings and implements a mechanism to log a warning when the channel pool undergoes repeated resizing cycles. It also includes several bug fixes related to channel count clamping and improves the internal logic for determining when a resize is necessary. The review feedback identifies a validation check for maxResizeDelta that is overly restrictive and could cause failures in valid configurations, such as small pools. Additionally, there is a concern regarding the thread safety of the consecutiveResizes counter, which is currently a primitive integer accessed outside of synchronized blocks.

@lqiu96 lqiu96 marked this pull request as ready for review April 20, 2026 20:23
@lqiu96 lqiu96 requested a review from a team as a code owner April 20, 2026 20:23
@lqiu96 lqiu96 changed the base branch from main to feat/channelpool-resizing April 20, 2026 20:23
@jinseopkim0
Copy link
Copy Markdown
Contributor

There're many CI failures.

Error: 9:580 [ERROR] Errors: 
Error: 9:580 [ERROR]   BigQueryConnectionTest.testBigQueryReadClientKeepAliveSettings:374 » IllegalState Max resize delta cannot be greater than max channel count
Error: 9:580 [ERROR]   BigQueryConnectionTest.testGetWriteClient:231 » IllegalState Max resize delta cannot be greater than max channel count
Error: 9:580 [ERROR]   BigQueryJdbcProxyUtilityTest.testGetTransportChannelProvider_withSslAndProxy:288 » IllegalState Max resize delta cannot be greater than max channel count
Error: 9:580 [ERROR]   BigQueryJdbcProxyUtilityTest.testGetTransportChannelProvider_withSslTrustStore_noPassword:265 » IllegalState Max resize delta cannot be greater than max channel count
Error: 9:580 [ERROR]   BigQueryJdbcProxyUtilityTest.testGetTransportChannelProvider_withSslTrustStore_withCorrectPassword:275 » IllegalState Max resize delta cannot be greater than max channel count

Can you please take a look?

lqiu96 added 5 commits April 21, 2026 14:23
…unds

# Conflicts:
#	sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/ChannelPoolTest.java
# Conflicts:
#	sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPoolSettings.java
#	sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/ChannelPoolTest.java
…y static pool config

# Conflicts:
#	sdk-platform-java/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPoolSettings.java
#	sdk-platform-java/gax-java/gax-grpc/src/test/java/com/google/api/gax/grpc/ChannelPoolTest.java
@lqiu96 lqiu96 force-pushed the fix/channelpool-logic-fix branch from cc0cb9b to 1c205e3 Compare April 21, 2026 18:36
Base automatically changed from feat/channelpool-resizing to main April 21, 2026 19:23
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'gapic-generator-java-root'

Failed conditions
14.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@lqiu96 lqiu96 requested a review from jinseopkim0 April 21, 2026 20:06
@lqiu96 lqiu96 changed the title fix: Channel clamping logic in ChannelPools to respect configured channel bounds fix: Channel resize logic in to respect configured channel bounds Apr 21, 2026
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.

3 participants