Skip to content

Commit 16d0435

Browse files
authored
Merge pull request #2460 from GoogleCloudPlatform/snehashah-bugfix
increasing response header size, adding instructions for snippets
2 parents 339282d + e1bbe83 commit 16d0435

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

google-cloud-spanner/src/main/java/com/google/cloud/spanner/SpannerOptions.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ private static ManagedChannel createChannel(String rootUrl, RpcChannelFactory fa
255255

256256
static class NettyRpcChannelFactory implements RpcChannelFactory {
257257
private static final int MAX_MESSAGE_SIZE = 100 * 1024 * 1024;
258+
private static final int MAX_HEADER_LIST_SIZE = 32 * 1024; //bytes
258259
private final String userAgent;
259260
private final List<ClientInterceptor> interceptors;
260261

@@ -277,6 +278,7 @@ public ManagedChannel newChannel(String host, int port) {
277278
NettyChannelBuilder.forAddress(host, port)
278279
.sslContext(newSslContext())
279280
.intercept(interceptors)
281+
.maxHeaderListSize(MAX_HEADER_LIST_SIZE)
280282
.maxMessageSize(MAX_MESSAGE_SIZE);
281283
if (userAgent != null) {
282284
builder.userAgent(userAgent);

utilities/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Utilities for Google Cloud Client Library for Java
2+
==========================
3+
4+
Adding Snippets
5+
----------
6+
7+
To add snippets to your source code file:
8+
```
9+
$ python utilities/add_snippets_to_file.py <snippets_path> <class_path>
10+
```
11+
12+
For missing dependencies:
13+
```
14+
$ sudo apt-get install python-pip
15+
$ sudo pip install virtualenv
16+
$ virtualenv env
17+
$ sudo pip install plyj
18+
19+
```

0 commit comments

Comments
 (0)