diff options
author | 2017-07-05 13:34:40 -0400 | |
---|---|---|
committer | 2017-07-06 07:12:56 -0400 | |
commit | 75aec49692b1ccddc8d2341d7e722682851d5fda (patch) | |
tree | 324695ca780abbc5cf68b5f39153ffaa909cccb0 /src/main/java/com/google/devtools/build | |
parent | 321cecdb656c0b1a7f2c0823c96500c61fdbbcfe (diff) |
Rewrite blob upload to use temporary files
Previously, it was allocating in-memory buffers for upload, which caused it to
run out of memory on large file uploads (or on many small uploads running
simultaneously).
Unfortunately, we don't create the temporary file in the right location (due
to separation of the BlobStore from the ByteStreamServer), so we copy the file
again to write it to the OnDiskBlobStore, which isn't ideal. There'll need to
be another BlobStore API change to make that work, when the InMemoryBlobStore
is gone.
PiperOrigin-RevId: 160974550
Diffstat (limited to 'src/main/java/com/google/devtools/build')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java index 8c0fcdc93a..daa4ab0cab 100644 --- a/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java +++ b/src/main/java/com/google/devtools/build/lib/remote/SimpleBlobStoreActionCache.java @@ -241,7 +241,7 @@ public final class SimpleBlobStoreActionCache implements RemoteActionCache { } } - private Digest uploadBlob(Digest digest, InputStream in) + public Digest uploadBlob(Digest digest, InputStream in) throws IOException, InterruptedException { blobStore.put(digest.getHash(), in); return digest; |