-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
tikv: drop store's regions when resolve store with tombstone status #22909
tikv: drop store's regions when resolve store with tombstone status #22909
Conversation
/cc @MyonKeminta @coocood |
/cc @HunDunDM |
@@ -1516,7 +1516,7 @@ func (s *Store) reResolve(c *RegionCache) { | |||
// we cannot do backoff in reResolve loop but try check other store and wait tick. | |||
return | |||
} | |||
if store == nil { | |||
if store == nil || store.State == metapb.StoreState_Tombstone { |
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.
@HunDunDM question, do we need drop region when state be StoreState_Offline
?
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.
store == nil
means the store is a tombstone. If the store doesn't exist, pdClient.GetStore()
returns an error: https://github.com/tikv/pd/blob/bc63de897afa69cfcc5828f45431fe3999fed4b3/client/client.go#L1159-L1168
LGTM |
@coocood: Please use If you have approved this PR, please ignore this reply. This reply is being used as a temporary reply during the migration of the new bot and will be removed on April 1. 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. |
/lgtm |
Signed-off-by: lysu <[email protected]>
Signed-off-by: lysu <[email protected]>
/LGTM |
[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 writing |
/merge |
@tiancaiamao: It seems you want to merge this PR, I will help you trigger all the tests: /run-all-tests You only need to trigger If you have any questions about the PR merge process, please refer to pr process. 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: 789d775
|
cherry pick to release-3.0 failed |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-4.0 in PR #23071 |
cherry pick to release-5.0-rc failed |
Signed-off-by: lysu [email protected]
What problem does this PR solve?
Issue Number: close #22907
Problem Summary:
old store id can get old tombstone store, so never have chance to refresh region peer to point to new store id
so request will block forever in old store with EpochNotMatchError
What is changed and how it works?
What's Changed:
drop region cache when resolve store but it's tombstone status
How it Works:
after it, retry will re-fetch new region info from PD which point to new store id..
so continue request will got to new store and never block
Related changes
pingcap/docs
/pingcap/docs-cn
:Check List
Tests
Side effects
Release note
This change is