-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 error code received from vttablets on context expiration #16685
Conversation
…fore the execution starts Signed-off-by: Manan Gupta <[email protected]>
Signed-off-by: Manan Gupta <[email protected]>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
Tests
Documentation
New flags
If a workflow is added or modified:
Backward compatibility
|
Signed-off-by: Manan Gupta <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16685 +/- ##
==========================================
- Coverage 68.93% 68.93% -0.01%
==========================================
Files 1564 1565 +1
Lines 201371 201533 +162
==========================================
+ Hits 138821 138922 +101
- Misses 62550 62611 +61 ☔ View full report in Codecov by Sentry. |
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, but other reviews should be addressed.
Signed-off-by: Manan Gupta <[email protected]>
Description
This PR fixes the error codes returned when context expires on vttablet even before the execution of the query starts. Previously we would return the error by calling
fmt.Errorf
, which on being translated to grpc error codes, would result inCode_UNKNOWN
. Instead if we usevterrors.Errorf
and usevtrpcpc.Code_CANCELLED
, we can get a better error code.Related Issue(s)
Checklist
Deployment Notes