-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In https://code-review.googlesource.com/c/google-api-go-client/+/43470, we accidentally removed a piece of logic that gave each chunk* a deadline. This adds it back. This CL also adds tests for retry logic, so that we don't miss it next time. This CL also removes contextDone(ctx context.Context) bool, since it's only used in one place, and in that one place we do the exact same logic right after contextDone is used. * Note: the single for loop in the aforementioned CL is not a for loop that only handles retries for "each chunk". That for loop handles both retries as well as multiple chunks (which could occur by way of incomplete transfers). When a new chunk was started, the for loop wasn't quit: instead, the backoff and retryDeadline was re-initialized. In this CL, that single for loop is split into an outer (per chunk) and inner (retry for a single chunk) for loop. Subsequently the backoff/retry reset logic is removed. This makes it more clear what's happening. Fixes #389 Change-Id: Ib66905efb5eaca5f9a40dccd343bff7c7d2b5aa3 Reviewed-on: https://code-review.googlesource.com/c/google-api-go-client/+/44070 Reviewed-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Tyler Bui-Palsulich <tbp@google.com>
- Loading branch information
Showing
3 changed files
with
180 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters