fix(storage): Update offset on resumable upload retry (#12086) · googleapis/google-cloud-go@6ce8fe5 · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Commit 6ce8fe5

Browse files
authored
fix(storage): Update offset on resumable upload retry (#12086)
When resumable uploads retry, they may observe a flush offset which is past the start of the current send (in fact the whole send might have already completed). In that case, we avoided re-sending unnecessary data, but we didn't update the offset to account for the data not sent.
1 parent 656d319 commit 6ce8fe5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

storage/grpc_writer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ func (s *gRPCResumableBidiWriteBufferSender) sendBuffer(ctx context.Context, buf
464464
trim = int64(len(buf))
465465
}
466466
buf = buf[trim:]
467+
offset += trim
467468
}
468469
if len(buf) == 0 && !flush && !finishWrite {
469470
// no need to send anything

0 commit comments

Comments
 (0)

TMZ Celebrity News – Breaking Stories, Videos & Gossip

Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

🎥 Watch TMZ Live

TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.