Skip to content
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

region_cache: invalidate cached region for not leader error (#18577) #18598

Merged
merged 3 commits into from
Jul 24, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #18577 to release-3.0


Signed-off-by: qupeng [email protected]

What problem does this PR solve?

In this case TiDB could report "region is unavailable":
A Region peer is isolated from its Raft group during it's being removed from the group. So it will never know who is the current leader of the Raft group. If TiDB sends requests to the peer, it will always report not leader, leader maybe None, which won't reload the cached region information.

What is changed and how it works?

Invalidate cached region information for this error.

Related changes

Check List

Tests

  • Manual test (add detailed scripts or steps below)

Side effects

Release note

  • No release note

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@hicqu please accept the invitation then you can push to the cherry-pick pull requests.
https://github.com/ti-srebot/tidb/invitations

@lysu
Copy link
Contributor

lysu commented Jul 16, 2020

@hicqu please help address conflict

@hicqu
Copy link
Contributor

hicqu commented Jul 24, 2020

/run-all-tests

1 similar comment
@hicqu
Copy link
Contributor

hicqu commented Jul 24, 2020

/run-all-tests

hicqu
hicqu previously approved these changes Jul 24, 2020
@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 24, 2020
@XuHuaiyu
Copy link
Contributor

LGTM

@ti-srebot ti-srebot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 24, 2020
@XuHuaiyu
Copy link
Contributor

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 24, 2020
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

@ti-srebot merge failed.

Signed-off-by: qupeng <[email protected]>
@hicqu hicqu force-pushed the release-3.0-07bd4dd261e1 branch from 755d809 to 4548f61 Compare July 24, 2020 08:03
@XuHuaiyu
Copy link
Contributor

/merge

@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot ti-srebot merged commit 28000d3 into pingcap:release-3.0 Jul 24, 2020
@hicqu hicqu deleted the release-3.0-07bd4dd261e1 branch July 24, 2020 10:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tikv status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/bugfix This PR fixes a bug. type/3.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants