Skip to content

Normalize the gRPC error handling #5309

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

Open
2 of 5 tasks
JmPotato opened this issue Jul 14, 2022 · 3 comments
Open
2 of 5 tasks

Normalize the gRPC error handling #5309

JmPotato opened this issue Jul 14, 2022 · 3 comments
Labels
type/development The issue belongs to a development tasks

Comments

@JmPotato
Copy link
Member

JmPotato commented Jul 14, 2022

As #5161 and tikv/tikv#12345 show, the gRPC error handling of PD is arbitrary. We mix using the gRPC error code and response header to return the error, which causes the TiKV may reconnect the PD incorrectly and unnecessarily. This is the tracking issue for normalizing the gRPC error handling of PD.

TODOs

@JmPotato JmPotato added the type/development The issue belongs to a development tasks label Jul 14, 2022
@JmPotato
Copy link
Member Author

cc @HuSharp @Connor1996

@Connor1996
Copy link
Member

Maybe not bother to add new error types.
For grpc connection error, it should return grpc error. For interface error, it should return unknown error. These error are properly handled in tikv/tikv#12827

@JmPotato
Copy link
Member Author

Maybe not bother to add new error types. For grpc connection error, it should return grpc error. For interface error, it should return unknown error. These error are properly handled in tikv/tikv#12827

Yes, the current task is to fix the PD's gRPC error handling according to this rule. Other normalizing work is more long-term or expected to be done sometime in the future.

ti-chi-bot bot pushed a commit that referenced this issue Jun 30, 2023
close #5161, ref #5309, ref #5310, ref pingcap/tiflash#7408

put the unknown error into the header instead of directly returning a gRPC error.

Signed-off-by: husharp <[email protected]>

Co-authored-by: Hu# <[email protected]>
Co-authored-by: Ti Chi Robot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/development The issue belongs to a development tasks
Projects
None yet
Development

No branches or pull requests

2 participants