store/tikv: fix misuse of PD client's GetStore (#23695)#24499
store/tikv: fix misuse of PD client's GetStore (#23695)#24499ti-srebot wants to merge 1 commit intopingcap:release-3.0from
Conversation
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
|
[REVIEW NOTIFICATION] This pull request has not been approved. 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. DetailsReviewer can indicate their review by writing |
|
/run-all-tests |
|
@longfangsong please accept the invitation then you can push to the cherry-pick pull requests. |
|
Please fix the tests and then re-request the review. Thanks! |
|
close for DMR version |
cherry-pick #23695 to release-3.0
You can switch your code base to this Pull Request by using git-extras:
# In tidb repo: git pr https://github.com/pingcap/tidb/pull/24499After apply modifications, you can push your change to this PR via:
Signed-off-by: longfangsong longfangsong@icloud.com
What problem does this PR solve?
Issue Number: close #23676
Problem Summary:
GetStore(), which may result in dead loops.store.Stateisn't changed if it becomes a tombstoneWhat is changed and how it works?
What's Changed:
Skip the early-return
ifbranch when "load Store from PD success but pd didn't found the store"How it Works:
By checking the error message. This is a quick and dirty solution. A better solution (which needs to change the pdClient, and maybe the whole way of our error handling process) needs more discussion.
Related changes
Needs to cherry-pick to 5.0.
Check List
Tests
Release note