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

Exclude codes.DeadlineExceeded from the list of retryable gRPC codes #1366

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions internal/common/retry/interceptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ var (
// gRPC response codes that represent retryable errors.
// The following status codes are never generated by the library:
// INVALID_ARGUMENT, NOT_FOUND, ALREADY_EXISTS, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, DATA_LOSS
retryableCodes = []codes.Code{codes.Aborted, codes.DeadlineExceeded, codes.Internal,
// codes.DeadlineExceeded and codes.Canceled are not here (and shouldn't be here!)
// because they are coming from go context and "context errors are not retriable based on user settings"
// by gRPC library.
retryableCodes = []codes.Code{codes.Aborted, codes.Internal,
codes.ResourceExhausted, codes.Unavailable, codes.Unknown}
retryableCodesWithoutInternal = []codes.Code{codes.Aborted, codes.DeadlineExceeded,
retryableCodesWithoutInternal = []codes.Code{codes.Aborted,
codes.ResourceExhausted, codes.Unavailable, codes.Unknown}
)

Expand Down
Loading