Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

feat: expose ChannelPoolSettings on GrpcStorageOptions.Builder - #3556

Closed
DeepikaMamidipelly009 wants to merge 2 commits into
googleapis:mainfrom
DeepikaMamidipelly009:channel-pool-settings-3553
Closed

DeepikaMamidipelly009 wants to merge 2 commits into
googleapis:mainfrom
DeepikaMamidipelly009:channel-pool-settings-3553

Conversation

@DeepikaMamidipelly009

Copy link
Copy Markdown

Fixes googleapis/google-cloud-java#14519

Summary

Adds setChannelPoolSettings(ChannelPoolSettings) to GrpcStorageOptions.Builder, wired through to InstantiatingGrpcChannelProvider in resolveSettingsAndOpts(). This lets users of the high-level Storage API (e.g. WriteChannel resumable uploads) configure the gRPC channel pool -- previously only possible via the lower-level StorageClient/StorageSettings -- which helps workloads with hundreds of concurrent RPCs that today queue on the default single channel.

Behavior when unset is unchanged (default channel pool).

Changes

  • GrpcStorageOptions.Builder.setChannelPoolSettings(...) (new @BetaApi)
  • GrpcStorageOptions carries the setting (transient; ChannelPoolSettings is not Serializable), includes it in equals/hashCode, and preserves it across toBuilder()
  • resolveSettingsAndOpts() applies it via InstantiatingGrpcChannelProvider.Builder.setChannelPoolSettings(...) when set

Tests

New GrpcStorageOptionsTest (3 tests, all passing):

  • setting is propagated to the resolved InstantiatingGrpcChannelProvider
  • unset still resolves with the default channel pool
  • toBuilder() round-trip preserves the setting (incl. equals/hashCode)

Also ran existing StorageOptionsBuilderTest (2/2 passing). Ran via mvn -pl google-cloud-storage -am test.

Note: I have not yet signed the Google CLA; I will complete it if this approach looks good.

@DeepikaMamidipelly009
DeepikaMamidipelly009 requested a review from a team as a code owner September 24, 2026 17:59
@google-cla

google-cla Bot commented Sep 24, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: storage Issues related to the googleapis/java-storage API. labels Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: storage Issues related to the googleapis/java-storage API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[java-storage] Feature request: expose ChannelPoolSettings on GrpcStorageOptions.Builder

2 participants