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

Merged
merged 4 commits into from
Dec 25, 2024
Merged

*: unify the gRPC errors #8910

merged 4 commits into from
Dec 25, 2024

Conversation

rleungx
Copy link
Member

@rleungx rleungx commented Dec 12, 2024

What problem does this PR solve?

Issue Number: Ref #8922

What is changed and how does it work?

Check List

Tests

  • Unit test

Release note

None.

@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
@rleungx rleungx changed the title *: unify the grpc errors *: unify the gRPC errors Dec 12, 2024
@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.24%. Comparing base (461b86a) to head (c813150).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8910      +/-   ##
==========================================
- Coverage   76.28%   76.24%   -0.04%     
==========================================
  Files         462      463       +1     
  Lines       70447    70452       +5     
==========================================
- Hits        53741    53718      -23     
- Misses      13362    13382      +20     
- Partials     3344     3352       +8     
Flag Coverage Δ
unittests 76.24% <32.55%> (-0.04%) ⬇️

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
@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. and removed do-not-merge/needs-linked-issue labels Dec 13, 2024
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot added the lgtm label Dec 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 25, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JmPotato, okJiang

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

The pull request process is described 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

@ti-chi-bot ti-chi-bot bot added approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 25, 2024
Copy link
Contributor

ti-chi-bot bot commented Dec 25, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-12-13 06:57:14.531252958 +0000 UTC m=+594424.620055502: ☑️ agreed by okJiang.
  • 2024-12-25 04:02:23.836820926 +0000 UTC m=+1620733.925623468: ☑️ agreed by JmPotato.

Signed-off-by: Ryan Leung <[email protected]>
@ti-chi-bot ti-chi-bot bot merged commit 054a3d4 into tikv:master Dec 25, 2024
23 of 25 checks passed
@rleungx rleungx deleted the grpc-error branch December 25, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved dco-signoff: yes Indicates the PR's author has signed the dco. lgtm 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.

3 participants