-
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
TiDB wrongly uses PD client's GetStore which may result in dead loops #23676
Comments
/assign @longfangsong |
@youjiali1995: GitHub didn't allow me to assign the following users: longfangsong. Note that only pingcap members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. In response to this:
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 kubernetes/test-infra repository. |
/assign |
BTW, the tidb/store/tikv/region_cache.go Lines 1786 to 1793 in a8a52c0
The store will be resolved forever now... |
Please edit this comment or add a new comment to complete the following informationBugNote: Make Sure that 'component', and 'severity' labels are added 1. Root Cause Analysis (RCA) (optional)Wrongly use the PD client. 2. Symptom (optional)None. TiDB runs normally. 3. All Trigger Conditions (optional)None 4. Workaround (optional)None 5. Affected versionsmaster 6. Fixed versionsmaster |
Bug Report
When TiDB meets the
StoreNotMatch
error, it will resolve the store through PD client'sGetStore()
:However, TiDB wrongly uses the PD client's
GetStore()
:tidb/store/tikv/region_cache.go
Lines 1775 to 1793 in a8a52c0
TiDB assumes it returns nil if the store is not found. In fact, if the store is a tombstone, it returns nil; if the store is not found, it returns an error. https://github.com/tikv/pd/blob/bc63de897afa69cfcc5828f45431fe3999fed4b3/client/client.go#L1159-L1168
So #22907 is not resolved.
The text was updated successfully, but these errors were encountered: