-
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
*: follower support to handle GetRegion
and other region api
#7432
*: follower support to handle GetRegion
and other region api
#7432
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. |
GetRegion
and other region api
GetRegion
and other region apiGetRegion
and other region api
cc @niubell |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #7432 +/- ##
==========================================
+ Coverage 74.79% 74.80% +0.01%
==========================================
Files 459 459
Lines 50978 51062 +84
==========================================
+ Hits 38128 38196 +68
- Misses 9489 9493 +4
- Partials 3361 3373 +12
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
c074c18
to
739deba
Compare
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
Signed-off-by: Cabinfever_B <[email protected]>
func (s *GrpcServer) validateRequest(header *pdpb.RequestHeader) error { | ||
if s.IsClosed() || !s.member.IsLeader() { | ||
return ErrNotLeader | ||
return s.validateRoleInRequest(context.TODO(), header, nil) |
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.
Why not just name it as validateRequest?
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.
Some code needs the original validateRequest
which only has one param and is easy to use, so I keep it.
server/grpc_service.go
Outdated
var region *core.RegionInfo | ||
if *followerHandle { | ||
rc = s.cluster | ||
if !s.cluster.GetRegionSyncer().IsRunning() { |
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.
if !s.cluster.GetRegionSyncer().IsRunning() { | |
if !rc.GetRegionSyncer().IsRunning() { |
Signed-off-by: Cabinfever_B <[email protected]>
/merge |
@nolouch: 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: c742353
|
@CabinfeverB: Your PR was out of date, I have automatically updated it for you. 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. |
…7432) ref tikv#7431 Signed-off-by: Cabinfever_B <[email protected]> Co-authored-by: ti-chi-bot[bot] <108142056+ti-chi-bot[bot]@users.noreply.github.com> Signed-off-by: pingandb <[email protected]>
mark |
What problem does this PR solve?
Issue Number: ref #7431
should be merged after #7489 #7611
What is changed and how does it work?
Check List
Tests
Code changes
Side effects
Related changes
pingcap/docs
/pingcap/docs-cn
:pingcap/tiup
:Release note