-
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
cluster: reset stores cache before loading cluster info #4942
Conversation
Signed-off-by: Ryan Leung <[email protected]>
[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. |
Codecov Report
@@ Coverage Diff @@
## master #4942 +/- ##
==========================================
+ Coverage 75.18% 75.24% +0.05%
==========================================
Files 297 297
Lines 29492 29496 +4
==========================================
+ Hits 22173 22193 +20
+ Misses 5369 5356 -13
+ Partials 1950 1947 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
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.
LGTM
tests/server/cluster/cluster_test.go
Outdated
svr = leaderServer.GetServer() | ||
rc = cluster.NewRaftCluster(s.ctx, svr.ClusterID(), syncer.NewRegionSyncer(svr), svr.GetClient(), svr.GetHTTPClient()) | ||
rc.InitCluster(svr.GetAllocator(), svr.GetPersistOptions(), svr.GetStorage(), svr.GetBasicCluster()) | ||
raftCluster, err = rc.LoadClusterInfo() |
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.
IMO, it is best not to call LoadClusterInfo
explicitly
raftCluster, err = rc.LoadClusterInfo() | |
newStores := svr.GetBasicCluster().GetStores() | |
// check store count | |
c.Assert(newStores, HasLen, 3) |
Signed-off-by: Ryan Leung <[email protected]>
/merge |
@nolouch: 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. |
This pull request has been accepted and is ready to merge. Commit hash: c9275ba
|
@rleungx: 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. |
In response to a cherrypick label: new pull request created: #4955. |
In response to a cherrypick label: new pull request created: #4956. |
In response to a cherrypick label: new pull request created: #4957. |
close tikv#4941 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4958. |
close tikv#4941 Signed-off-by: ti-chi-bot <[email protected]>
In response to a cherrypick label: new pull request created: #4959. |
close #4941, ref #4942 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
close #4941, ref #4942 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
close #4941, ref #4942 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
close #4941, ref #4942 Signed-off-by: ti-chi-bot <[email protected]> Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
close #4941, ref #4942 Signed-off-by: Ryan Leung <[email protected]> Co-authored-by: Ryan Leung <[email protected]>
Signed-off-by: Ryan Leung [email protected]
What problem does this PR solve?
Issue Number: Close #4941.
What is changed and how does it work?
This PR resets the new leader store cache after transferring the PD leader.
Check List
Tests
Release note