aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/remote/ByteStreamUploader.java
Commit message (Collapse)AuthorAge
* update to MethodDescriptor methods instead of fieldsGravatar Carl Mastrangelo2018-03-08
| | | | | | | | @buchgr Closes #4790. PiperOrigin-RevId: 188332795
* remote: Add interceptor for logging gRPC calls during remote execution/cachingGravatar Googler2018-03-05
| | | | | | | | | | This provides a io.grpc.ClientInterceptor implementation that can be used to log gRPC call information. The interceptor can select a logging handler to use based on the gRPC method being called (Watch, Execute, Write, etc) to build a LogEntry, which can then be logged after the call has finished. Unit tests for the interceptor are included. In this change, the interceptor is never invoked, nor are there any handlers implemented for any gRPC methods. The interceptor also never tries to log any entries. To avoid circular dependency issues (Remote library will depend on logger which depends on remote library for utils), I've factored out the utility classes from the remote library into their own directory/package as part of this change. PiperOrigin-RevId: 187926516
* remote: Replace Retrier with Retrier2.Gravatar buchgr2017-12-04
| | | | | | | | | - Replace the existing Retrier with Retrier2. - Rename Retrier2 to Retrier and remove the old Retrier + RetryException class. RELNOTES: None. PiperOrigin-RevId: 177835070
* Replace all usages of Blaze's Preconditions class with guava.Gravatar tomlu2017-11-09
| | | | | | | | Blaze had its own class to avoid GC from varargs array creation for the precondition happy path. Guava now (mostly) implements these, making it unnecessary to maintain our own. This change was almost entirely automated by search-and-replace. A few BUILD files needed fixing up since I removed an export of preconditions from lib:util, which was all done by add_deps. There was one incorrect usage of Preconditions that was caught by error prone (which checks Guava's version of Preconditions) that I had to change manually. PiperOrigin-RevId: 175033526
* Passing Bazel metadata in gRPC headers.Gravatar olaola2017-09-21
| | | | | | TESTED=unit tests RELNOTES: none PiperOrigin-RevId: 169395919
* Remove ALREADY_EXISTS special treatment from the CAS uploader. This error ↵Gravatar olaola2017-08-22
| | | | | | | | should no longer be thrown by any CAS implementations. TESTED=unit tests RELNOTES: none PiperOrigin-RevId: 165937395
* Fix #3416: catch the ALREADY_EXISTS status code on upload, and treat it as ↵Gravatar olaola2017-07-21
| | | | | | | | | success. This can happen per spec, if multiple builds try to upload the same blob concurrently. Also, added this to the RemoteWorker, per spec. PiperOrigin-RevId: 162647548
* remote: Failed blob upload should close file handle.Gravatar buchgr2017-07-17
| | | | | | | | | | | Two cases: - The upload succeeds and the Chunker consumes all its data and closes the underlying data source. - The upload fails and the Chunker doesn't close the data source, and so we call reset() manually. RELNOTES: None. PiperOrigin-RevId: 162178032
* remote: Rewrite ChunkerGravatar buchgr2017-07-12
| | | | | | | | | | | | | | | | | - Remove the Chunker.Builder and use the Chunker constructors instead. - Fix a correctness bug, where the chunker would ignore the return value of InputStream.read(byte[]). - Have Chunk.getData() return a ByteString as opposed to a byte[]. All callsides need ByteString objects and this change makes the subsequent change possible. - Have the Chunker use a preallocated byte[] in order to avoid allocating a new one on every call to next(). RELNOTES: None. PiperOrigin-RevId: 161637158
* remote: Rewrite the ByteStream upload.Gravatar buchgr2017-07-10
The current ByteStream upload implementation has no support for application-level flow control, which resulted in excessive buffering and OOM errors. The new implementation respects gRPCs flow control. Additionally, this code adds support for multiple uploads of the same digest. That is, if a digest (i.e. file) is uploaded several times concurrently, only one upload will be performed. RELNOTES: None. PiperOrigin-RevId: 161287337