Conversation
…l bursts and scalability
There was a problem hiding this comment.
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.
|
/gemini review |
There was a problem hiding this comment.
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.
Changes:
Integer.MAX_VALUE)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.