Skip to content

Commit

Permalink
Remote: handle early return of compressed blobs uploads
Browse files Browse the repository at this point in the history
This is an implementation of this REAPI spec update:
bazelbuild/remote-apis#213

Here's a bazel-remote build that can be used to test this change:
buchgr/bazel-remote#527

Fixes bazelbuild#14654
  • Loading branch information
mostynb committed Feb 19, 2022
1 parent ac48e65 commit ffdcffb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Shreya Bhattarai <shreyax@google.com>
Kevin Bierhoff <kmb@google.com>
Klaas Boesche <klaasb@google.com>
Phil Bordelon <sunfall@google.com>
Mostyn Bramley-Moore <mostyn@antipode.se>
Jon Brandvein <brandjon@google.com>
Volker Braun <vbraun.name@gmail.com>
Thomas Broyer <t.broyer@ltgt.net>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ ListenableFuture<Void> start() {
// level/algorithm, so we cannot know the expected committed offset
long committedSize = committedOffset.get();
long expected = chunker.getOffset();
if (!chunker.hasNext() && committedSize != expected) {
if (!chunker.hasNext() && committedSize != expected || (chunker.isCompressed() && committedSize == -1)) {
String message =
format(
"write incomplete: committed_size %d for %d total",
Expand Down

0 comments on commit ffdcffb

Please sign in to comment.