store/tikv: fix misuse of PD client's GetStore (#23695)#24498
store/tikv: fix misuse of PD client's GetStore (#23695)#24498ti-chi-bot merged 5 commits intopingcap:release-4.0from
Conversation
|
/run-all-tests |
|
@longfangsong please accept the invitation then you can push to the cherry-pick pull requests. |
c580c91 to
11457c5
Compare
|
/run-check-dev |
|
[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. DetailsReviewer can indicate their review by writing |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 11457c54d222ad137f573be356fcc649b7fcf5e8 |
|
/run-check_dev |
2e67738 to
333f0a8
Compare
|
/merge |
Signed-off-by: ti-srebot <ti-srebot@pingcap.com> Signed-off-by: youjiali1995 <zlwgx1023@gmail.com>
c2ac4f4 to
0172c1b
Compare
|
/merge |
|
/run-unit-test |
|
@ti-srebot: 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. DetailsInstructions 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. |
cherry-pick #23695 to release-4.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/24498After 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