-
Notifications
You must be signed in to change notification settings - Fork 216
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
Exclude codes.DeadlineExceeded from the list of retryable gRPC codes #1366
Conversation
This list of errors is common across SDKs, do we need to update them as well? |
For that you need to check gRPC library implementation in those langs. I hope it is consistent there. |
|
I think this should be checked/fixed on server. Server should never explicitly return CDE if user context is not timed out yet. I checked persistence layer, and CDE is always replaced with internal error ( |
To confirm this PR, since the interceptor skips retrying this code no matter what, this is just to remove the unnecessary item from our list? There should be no runtime effect, correct? |
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.
LGTM, would like @Quinn-With-Two-Ns approval before merge.
Yes, it doesn't change behaviour. CDE was never retried (I've just discovered this today). So I decided to align our codes with gRPC lib implementation. |
What was changed
Exclude
codes.DeadlineExceeded
from the list of retryable gRPC codes.Why?
gRPC library doesn't retry "context errors" (
codes.DeadlineExceeded
andcodes.Canceled
), so remove them from the list of retryable codes to eliminate the confusion.isRetriable
: https://github.com/grpc-ecosystem/go-grpc-middleware/blob/main/interceptors/retry/retry.go#L269isContextError
: https://github.com/grpc-ecosystem/go-grpc-middleware/blob/main/interceptors/retry/retry.go#L283