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

*: put gRPC unknown error into the header. #5310

Merged
merged 4 commits into from
Jul 21, 2022

Conversation

HuSharp
Copy link
Member

@HuSharp HuSharp commented Jul 14, 2022

Signed-off-by: husharp jinhao.hu@pingcap.com

What problem does this PR solve?

Issue Number: Ref #5309. Close #5161

What is changed and how does it work?

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

Check List

Tests

  • Unit test

Release note

Put the unknown error into the header instead of directly returning a gRPC error.
And modify related uint tests and code.

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jul 14, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • Connor1996
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added the release-note-none Denotes a PR that doesn't merit a release note. label Jul 14, 2022
@JmPotato JmPotato requested a review from Connor1996 July 14, 2022 10:07
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 14, 2022
server/grpc_service.go Outdated Show resolved Hide resolved
server/grpc_service.go__failpoint_stash__ Outdated Show resolved Hide resolved
server/server.go__failpoint_stash__ Outdated Show resolved Hide resolved
server/util.go Outdated Show resolved Hide resolved
server/grpc_service.go Show resolved Hide resolved
server/grpc_service.go Show resolved Hide resolved
Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

server/grpc_service.go 100644 → 100755.

Please change the file access permission back.

@HuSharp HuSharp changed the title server: put gRPC unknown error into the header. server/tso: put gRPC unknown error into the header. Jul 15, 2022
@HuSharp HuSharp changed the title server/tso: put gRPC unknown error into the header. *: put gRPC unknown error into the header. Jul 15, 2022
@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Jul 15, 2022
@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #5310 (52314db) into master (3480a62) will increase coverage by 0.05%.
The diff coverage is 25.56%.

❗ Current head 52314db differs from pull request most recent head 0f8e815. Consider uploading reports for the commit 0f8e815 to get more accurate results

@@            Coverage Diff             @@
##           master    #5310      +/-   ##
==========================================
+ Coverage   75.69%   75.74%   +0.05%     
==========================================
  Files         312      312              
  Lines       31000    31043      +43     
==========================================
+ Hits        23464    23513      +49     
- Misses       5523     5528       +5     
+ Partials     2013     2002      -11     
Flag Coverage Δ
unittests 75.74% <25.56%> (+0.05%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/api/member.go 52.38% <0.00%> (-0.85%) ⬇️
server/tso/global_allocator.go 61.25% <0.00%> (-1.32%) ⬇️
server/grpc_service.go 50.72% <19.31%> (-1.25%) ⬇️
tests/cluster.go 79.26% <25.00%> (-1.08%) ⬇️
client/client.go 69.52% <38.46%> (+0.90%) ⬆️
client/base_client.go 82.29% <100.00%> (+0.25%) ⬆️
server/tso/allocator_manager.go 63.18% <100.00%> (-1.71%) ⬇️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
pkg/dashboard/adapter/redirector.go 84.44% <0.00%> (-6.86%) ⬇️
server/tso/tso.go 69.49% <0.00%> (-3.39%) ⬇️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3480a62...0f8e815. Read the comment docs.

client/base_client.go Outdated Show resolved Hide resolved
client/client.go Outdated Show resolved Hide resolved
server/api/member.go Outdated Show resolved Hide resolved
server/tso/allocator_manager.go Outdated Show resolved Hide resolved
server/tso/global_allocator.go Outdated Show resolved Hide resolved
tests/cluster.go Show resolved Hide resolved
@HuSharp HuSharp force-pushed the bugfix_grpc_error_return branch 2 times, most recently from c75db57 to ffcb61a Compare July 19, 2022 09:22
client/base_client.go Outdated Show resolved Hide resolved
tools/pd-simulator/simulator/client.go Outdated Show resolved Hide resolved
tools/pd-simulator/simulator/client.go Outdated Show resolved Hide resolved
server/api/label_test.go Outdated Show resolved Hide resolved
… gRPC error.

Signed-off-by: husharp <jinhao.hu@pingcap.com>
Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

The rest LGTM.

client/client.go Outdated Show resolved Hide resolved
@ti-chi-bot
Copy link
Member

@JmPotato: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 52314db

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 21, 2022
@ti-chi-bot
Copy link
Member

@HuSharp: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot ti-chi-bot merged commit bde0a1b into tikv:master Jul 21, 2022
@HuSharp HuSharp deleted the bugfix_grpc_error_return branch July 22, 2022 07:14
ti-chi-bot added a commit that referenced this pull request Mar 6, 2023
ref #5310, ref #6069

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
ti-chi-bot added a commit that referenced this pull request Mar 6, 2023
ref #5310, ref #6069, ref #6070

Signed-off-by: Ryan Leung <rleungx@gmail.com>

Co-authored-by: Ryan Leung <rleungx@gmail.com>
nolouch pushed a commit to nolouch/pd that referenced this pull request Jun 30, 2023
close tikv#5161, ref tikv#5161

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

Signed-off-by: husharp <jinhao.hu@pingcap.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
nolouch pushed a commit to nolouch/pd that referenced this pull request Jun 30, 2023
close tikv#5161, ref tikv#5161

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

Signed-off-by: husharp <jinhao.hu@pingcap.com>

Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
@nolouch nolouch added needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. labels Jun 30, 2023
@nolouch
Copy link
Contributor

nolouch commented Jun 30, 2023

/run-cherry-pick

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-6.5: #6727.

@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-7.1: #6728.

ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 30, 2023
close tikv#5161, ref tikv#5161

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
ti-chi-bot pushed a commit to ti-chi-bot/pd that referenced this pull request Jun 30, 2023
close tikv#5161, ref tikv#5161

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@nolouch nolouch removed the needs-cherry-pick-release-7.1 Should cherry pick this PR to release-7.1 branch. label Jun 30, 2023
ti-chi-bot bot pushed a commit that referenced this pull request 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 <jinhao.hu@pingcap.com>

Co-authored-by: Hu# <jinhao.hu@pingcap.com>
Co-authored-by: Ti Chi Robot <ti-community-prow-bot@tidb.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-6.5 Should cherry pick this PR to release-6.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The error returned by PD gRPC service is not expected
6 participants