Skip to content
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): retry gRPC DEADLINE_EXCEEDED errors #10635

Merged
merged 3 commits into from
Aug 6, 2024

Conversation

tritone
Copy link
Contributor

@tritone tritone commented Aug 5, 2024

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

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/
@tritone tritone requested review from a team as code owners August 5, 2024 15:42
@product-auto-label product-auto-label bot added the api: storage Issues related to the Cloud Storage API. label 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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confused by this test, is this to cause DeadlineExceeded client-side while the other is meant for server side (storage-testbench) to cause DeadlineExceeded?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link

@andrewsg andrewsg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't speak golang well enough to understand the tests, but the functional code LGTM

storage/invoke.go Show resolved Hide resolved
storage/client_test.go Show resolved Hide resolved
@tritone tritone merged commit 0018415 into googleapis:main Aug 6, 2024
8 checks passed
@tritone tritone deleted the deadline-exceeded-retry branch August 6, 2024 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the Cloud Storage API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: TestIntegration_PublicObject failed
4 participants