-
Notifications
You must be signed in to change notification settings - Fork 728
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
*: Improve region forward #7305
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Skipping CI for Draft Pull Request. |
ee13cd4
to
0f0fa4b
Compare
Signed-off-by: Ryan Leung <[email protected]>
0f0fa4b
to
e71141b
Compare
e71141b
to
f4d067f
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7305 +/- ##
==========================================
- Coverage 74.55% 74.36% -0.19%
==========================================
Files 447 451 +4
Lines 48666 48867 +201
==========================================
+ Hits 36282 36341 +59
- Misses 9189 9320 +131
- Partials 3195 3206 +11
Flags with carried forward coverage won't be shown. Click here to find out more. |
f4d067f
to
a46cfb2
Compare
Signed-off-by: Ryan Leung <[email protected]>
a46cfb2
to
f48ff19
Compare
resp, err := s.forwardTSORequest(forwardCtx, request, forwardStream) | ||
close(done) | ||
if err != nil { | ||
if strings.Contains(err.Error(), errs.NotLeaderErr) { |
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.
How about add a handleErr
func?
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.
I don't change the logic here, maybe we can keep it as it is.
return conn.(*grpc.ClientConn), nil | ||
} | ||
|
||
func (s *GrpcServer) getForwardedHost(ctx, streamCtx context.Context, serviceName ...string) (forwardedHost string, err error) { |
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.
func (s *GrpcServer) getForwardedHost(ctx, streamCtx context.Context, serviceName ...string) (forwardedHost string, err error) { | |
func (s *GrpcServer) getForwardedHost(ctx, streamCtx context.Context, serviceNames ...string) (forwardedHost string, err error) { |
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.
It's just an optional parameter in stead of plural.
/merge |
@rleungx: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger
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. |
This pull request has been accepted and is ready to merge. Commit hash: f48ff19
|
ref tikv#5839 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com>
What problem does this PR solve?
Issue Number: Ref #5839.
What is changed and how does it work?
Improve the region forwarding logic.
Check List
Tests
Release note