Skip to content

Commit ed989ea

Browse files
committed
add comment
1 parent 2b66204 commit ed989ea

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

google-cloud-datastore/src/main/java/com/google/cloud/datastore/DatastoreOptions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ private DatastoreOptions(Builder builder) {
219219
throw new IllegalArgumentException(
220220
"Only gRPC transport allows setting of channel provider or credentials provider");
221221
} else if (getTransportOptions() instanceof GrpcTransportOptions) {
222+
// For grpc transport options, configure default gRPC Connection pool with minChannelCount = 1 and maxChannelCount = 4
222223
this.channelProvider =
223224
builder.channelProvider != null
224225
? builder.channelProvider
@@ -227,7 +228,7 @@ private DatastoreOptions(Builder builder) {
227228
.setChannelPoolSettings(
228229
ChannelPoolSettings.builder()
229230
.setMinChannelCount(1)
230-
.setInitialChannelCount(4)
231+
.setMaxChannelCount(4)
231232
.build()),
232233
this);
233234
}

google-cloud-datastore/src/main/java/com/google/cloud/datastore/spi/v1/GrpcDatastoreRpc.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ public GrpcDatastoreRpc(DatastoreOptions datastoreOptions) throws IOException {
7575
? getClientContextForEmulator(datastoreOptions)
7676
: getClientContext(datastoreOptions);
7777

78+
/* For grpc transport options, configure default gRPC Connection pool with minChannelCount = 1 and maxChannelCount = 4 */
7879
DatastoreStubSettings datastoreStubSettings =
7980
DatastoreStubSettings.newBuilder(clientContext)
8081
.applyToAllUnaryMethods(retrySettingSetter(datastoreOptions))

0 commit comments

Comments
 (0)