-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(storage): Update offset on resumable upload retry #12086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(storage): Update offset on resumable upload retry #12086
Conversation
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked with @cjc25 ; test coverage for this will come via a fix in storage-testbench.
The test failure here is only on "earliest version" (go 1.23.6) not "latest version" (go 1.24.0):
Which is... surprising :). Maybe just flaky comparison, but I don't think related to this PR. I can look later. |
This is somewhat surprising for the emulator but might just be a flake; I triggered a rerun. |
The issue is that we check specifically that the error is context.DeadlineExceeded, but this is a gRPC-layer DeadlineExceeded. I don't think that can be reliable: the context deadline is propagated to the server, so now there are two clocks, and the server might return a DeadlineExceeded error before the local context is actually cancelled. I'll send a PR to check for gRPC errors too. |
#12092 to fix the flake |
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.
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.