File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
google-cloud-datastore/src/main/java/com/google/cloud/datastore Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -219,6 +219,7 @@ private DatastoreOptions(Builder builder) {
219
219
throw new IllegalArgumentException (
220
220
"Only gRPC transport allows setting of channel provider or credentials provider" );
221
221
} else if (getTransportOptions () instanceof GrpcTransportOptions ) {
222
+ // For grpc transport options, configure default gRPC Connection pool with minChannelCount = 1 and maxChannelCount = 4
222
223
this .channelProvider =
223
224
builder .channelProvider != null
224
225
? builder .channelProvider
@@ -227,7 +228,7 @@ private DatastoreOptions(Builder builder) {
227
228
.setChannelPoolSettings (
228
229
ChannelPoolSettings .builder ()
229
230
.setMinChannelCount (1 )
230
- .setInitialChannelCount (4 )
231
+ .setMaxChannelCount (4 )
231
232
.build ()),
232
233
this );
233
234
}
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public GrpcDatastoreRpc(DatastoreOptions datastoreOptions) throws IOException {
75
75
? getClientContextForEmulator (datastoreOptions )
76
76
: getClientContext (datastoreOptions );
77
77
78
+ /* For grpc transport options, configure default gRPC Connection pool with minChannelCount = 1 and maxChannelCount = 4 */
78
79
DatastoreStubSettings datastoreStubSettings =
79
80
DatastoreStubSettings .newBuilder (clientContext )
80
81
.applyToAllUnaryMethods (retrySettingSetter (datastoreOptions ))
You can’t perform that action at this time.
0 commit comments