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

*: unify the gRPC errors #8910

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

*: unify the gRPC errors #8910

wants to merge 1 commit into from

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Dec 12, 2024

What problem does this PR solve?

Issue Number: Close #xxx

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. labels Dec 12, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 12, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from rleungx, ensuring that each of them provides their approval before proceeding. For more information see the Code Review Process.

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

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@rleungx rleungx changed the title *: unify the grpc errors *: unify the gRPC errors Dec 12, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 12, 2024

[FORMAT CHECKER NOTIFICATION]

Notice: To remove the do-not-merge/needs-linked-issue label, please provide the linked issue number on one line in the PR body, for example: Issue Number: close #123 or Issue Number: ref #456, multiple issues should use full syntax for each issue and be separated by a comma, like: Issue Number: close #123, ref #456.

📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md.

@ti-chi-bot ti-chi-bot bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 12, 2024
@@ -589,19 +570,18 @@ func (s *GrpcServer) Tso(stream pdpb.PD_TsoServer) error {
start := time.Now()
// TSO uses leader lease to determine validity. No need to check leader here.
if s.IsClosed() {
return status.Errorf(codes.Unknown, "server not started")
Copy link
Member Author

Choose a reason for hiding this comment

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

Here I change the status code to Unavailable, the same as other places.

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 32.55814% with 58 lines in your changes missing coverage. Please review.

Project coverage is 76.19%. Comparing base (5d62787) to head (4d868ca).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8910      +/-   ##
==========================================
- Coverage   76.25%   76.19%   -0.06%     
==========================================
  Files         461      462       +1     
  Lines       70395    70400       +5     
==========================================
- Hits        53677    53639      -38     
- Misses      13372    13406      +34     
- Partials     3346     3355       +9     
Flag Coverage Δ
unittests 76.19% <32.55%> (-0.06%) ⬇️

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

@rleungx rleungx requested review from JmPotato and okJiang December 12, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dco-signoff: yes Indicates the PR's author has signed the dco. do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant