Skip to content

feat(datastore): Update default channel pool configs to handle initial bursts and scalability#12883

Merged
lqiu96 merged 6 commits intomainfrom
datastore-channelpool-defaults
Apr 22, 2026
Merged

feat(datastore): Update default channel pool configs to handle initial bursts and scalability#12883
lqiu96 merged 6 commits intomainfrom
datastore-channelpool-defaults

Conversation

@lqiu96
Copy link
Copy Markdown
Member

@lqiu96 lqiu96 commented Apr 21, 2026

Changes:

  • Update the initial channel count in the channel pool config to be 5 (was 1)
  • Set the max RPCs per channel to be 100 (was Integer.MAX_VALUE)
  • Increase the channel pool resize delta to 5 (was 2)
  • Fix the datastore options to be properly plumbed through the settings

This will set the initial allowed QPS to be 500 instead of 100. This should allow for Datastore to better handle an initial burst of requests and scale quicker if needed. Since the delta also applies to downsizing, channel count will shrink as needed if there is low QPS so memory can be freed.

@lqiu96 lqiu96 requested a review from jinseopkim0 April 21, 2026 20:57
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 gRPC channel pool configuration for Datastore by increasing the initial channel count and introducing settings for resize delta and maximum RPCs per channel. However, a potential ClassCastException was identified in GrpcDatastoreRpc where the code assumes the transport provider is always an InstantiatingGrpcChannelProvider. Additionally, a logical inconsistency exists in DatastoreOptions as the initial channel count is now greater than the maximum channel count, and a stale comment needs to be removed according to style guidelines.

@lqiu96 lqiu96 marked this pull request as ready for review April 21, 2026 21:35
@lqiu96 lqiu96 requested a review from a team as a code owner April 21, 2026 21:35
@lqiu96
Copy link
Copy Markdown
Member Author

lqiu96 commented Apr 21, 2026

/gemini review

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 default gRPC channel pool configuration for Datastore to better handle high request loads by increasing the initial channel count and setting specific values for max RPCs per channel and resize delta. Review feedback identifies a potential ClassCastException due to an unsafe type cast in GrpcDatastoreRpc and a logical inconsistency where the obsolete MAX_CHANNEL_COUNT constant is now lower than the new INIT_CHANNEL_COUNT.

@lqiu96 lqiu96 enabled auto-merge (squash) April 22, 2026 16:46
@lqiu96 lqiu96 merged commit 26fe0f9 into main Apr 22, 2026
123 checks passed
@lqiu96 lqiu96 deleted the datastore-channelpool-defaults branch April 22, 2026 16:52
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