fix(storage): retry gRPC DEADLINE_EXCEEDED errors#10635
Merged
tritone merged 3 commits intogoogleapis:mainfrom Aug 6, 2024
Merged
fix(storage): retry gRPC DEADLINE_EXCEEDED errors#10635tritone merged 3 commits intogoogleapis:mainfrom
tritone merged 3 commits intogoogleapis:mainfrom
Conversation
GCS is in some cases returning these for internal timeouts, so they need to be retried. I added an extra context error check to our retry logic to ensure that they can always be distinguished from user-set deadlines as well as some tests. See internal bug b/
frankyn
reviewed
Aug 5, 2024
| // status when it is returned by the server. | ||
| func TestTimeoutErrorEmulated(t *testing.T) { | ||
| transportClientTest(t, func(t *testing.T, project, bucket string, client storageClient) { | ||
| ctx, cancel := context.WithTimeout(context.Background(), time.Nanosecond) |
Contributor
There was a problem hiding this comment.
Confused by this test, is this to cause DeadlineExceeded client-side while the other is meant for server side (storage-testbench) to cause DeadlineExceeded?
Contributor
Author
There was a problem hiding this comment.
Yes exactly. We want to make sure that client-set deadlines are not retried (to avoid issue mentioned in https://google.aip.dev/194#non-retryable-codes ) but that a DEADLINE_EXCEEDED returned by the server is retried.
andrewsg
approved these changes
Aug 5, 2024
andrewsg
left a comment
There was a problem hiding this comment.
I don't speak golang well enough to understand the tests, but the functional code LGTM
BrennaEpp
reviewed
Aug 6, 2024
BrennaEpp
approved these changes
Aug 6, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GCS is in some cases returning these for internal timeouts, so they need to be retried. I added an extra context error check to our retry logic to ensure that they can always be distinguished from user-set deadlines as well as some tests.
See internal bug b/333307965
Requires googleapis/storage-testbench#663
Fixes #9827