diff options
author | 2017-12-19 03:42:08 -0800 | |
---|---|---|
committer | 2017-12-19 03:44:08 -0800 | |
commit | 30ffe79ee7ab1f07b1ebb1eb42c1c4536006f01f (patch) | |
tree | c5223d2f230bc6f10785e4c4f5dbf07b367a1788 /src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java | |
parent | 7b423ccd9506c6fb500b5c4998e1f26aebf28912 (diff) |
remote: deprecate --remote_rest_cache_pool_size
There's no point in having this option. We'll use as many TCP
connections as we'll need. Fewer options FTW.
Change-Id: I502eadd6a3a35040c7eda05ef49320b273ac26ad
PiperOrigin-RevId: 179533022
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java b/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java index 0e5515fb08..87abdda082 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java +++ b/src/main/java/com/google/devtools/build/lib/remote/blobstore/RestBlobStore.java @@ -64,13 +64,16 @@ public final class RestBlobStore implements SimpleBlobStore { * @param baseUrl base URL for the remote cache * @param poolSize maximum number of simultaneous connections */ - public RestBlobStore(String baseUrl, int poolSize, int timeoutMillis, @Nullable Credentials creds) + public RestBlobStore(String baseUrl, int timeoutMillis, @Nullable Credentials creds) throws IOException { validateUrl(baseUrl); this.baseUrl = baseUrl; PoolingHttpClientConnectionManager connMan = new PoolingHttpClientConnectionManager(); - connMan.setDefaultMaxPerRoute(poolSize); - connMan.setMaxTotal(poolSize); + // We'll use as many connections as necessary. The connection pool tries to re-use open + // connections before creating new ones, so in practice we should have as many connections + // as concurrent actions. + connMan.setDefaultMaxPerRoute(Integer.MAX_VALUE); + connMan.setMaxTotal(Integer.MAX_VALUE); clientFactory = HttpClientBuilder.create(); clientFactory.setConnectionManager(connMan); clientFactory.setConnectionManagerShared(true); |