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

tikv: pre-index stores in region-cache for different access pattern (#18040) #18105

Merged
merged 2 commits into from
Jun 18, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #18040 to release-4.0


What problem does this PR solve?

Issue Number: close #17930

Problem Summary:

  • there are many possibilities to retry wrong store type
  • we should have more access pattern in future, filter labels at access time are inefficient

What is changed and how it works?

What's Changed, How it Works:

  • add accessIndex field to save idx in regionStore.Stores, and set index in RPCCtx be index of accessIndex
  • choose any tikv store peer as leader when tiflash return EpochNotMatch

Related changes

  • Need to cherry-pick to the release branch 4.0

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • n/a

Release note

  • Pre-index stores in region-cache for different access pattern

This change is Reviewable

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
@ti-srebot
Copy link
Contributor Author

/run-all-tests

@ti-srebot
Copy link
Contributor Author

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

@lysu lysu added the priority/release-blocker This issue blocks a release. Please solve it ASAP. label Jun 18, 2020
Copy link
Member

@jackysp jackysp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jackysp jackysp added the status/LGT1 Indicates that a PR has LGTM 1. label Jun 18, 2020
Copy link
Member

@coocood coocood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lysu
Copy link
Contributor

lysu commented Jun 18, 2020

/run-integration-br-test

@lysu
Copy link
Contributor

lysu commented Jun 18, 2020

/run-all-tests

2 similar comments
@lysu
Copy link
Contributor

lysu commented Jun 18, 2020

/run-all-tests

@lysu
Copy link
Contributor

lysu commented Jun 18, 2020

/run-all-tests

@lysu lysu merged commit 0082d04 into pingcap:release-4.0 Jun 18, 2020
@lysu lysu deleted the release-4.0-ad68349bd2bf branch June 18, 2020 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tikv priority/release-blocker This issue blocks a release. Please solve it ASAP. sig/execution SIG execution status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug. type/enhancement The issue or PR belongs to an enhancement. type/4.0-cherry-pick
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants