Skip to content

Commit 735ab0b

Browse files
authored
chore: bump the max inbound message size from GRPC's default 4MB (#3989)
* chore: bump set the max inbound message size from GRPC's default 4MB * trigger build
1 parent 5651f61 commit 735ab0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/spi/v1/GapicSpannerRpc.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public class GapicSpannerRpc implements SpannerRpc {
224224
PathTemplate.create("projects/{project}");
225225
private static final PathTemplate OPERATION_NAME_TEMPLATE =
226226
PathTemplate.create("{database=projects/*/instances/*/databases/*}/operations/{operation}");
227-
private static final int MAX_MESSAGE_SIZE = 100 * 1024 * 1024;
227+
private static final int MAX_MESSAGE_SIZE = 256 * 1024 * 1024;
228228
private static final int MAX_METADATA_SIZE = 32 * 1024; // bytes
229229
private static final String PROPERTY_TIMEOUT_SECONDS =
230230
"com.google.cloud.spanner.watchdogTimeoutSeconds";
@@ -344,6 +344,8 @@ public GapicSpannerRpc(final SpannerOptions options) {
344344
InstantiatingGrpcChannelProvider.newBuilder()
345345
.setChannelConfigurator(options.getChannelConfigurator())
346346
.setEndpoint(options.getEndpoint())
347+
.setMaxInboundMessageSize(MAX_MESSAGE_SIZE)
348+
.setMaxInboundMetadataSize(MAX_METADATA_SIZE)
347349
.setPoolSize(options.getNumChannels())
348350

349351
// Set a keepalive time of 120 seconds to help long running

0 commit comments

Comments
 (0)