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: fix region cache do not filter the down peers #17337

Merged
merged 7 commits into from
May 21, 2020

Conversation

lzmhhh123
Copy link
Contributor

What problem does this PR solve?

Issue Number: close #17336

Problem Summary: filter the down peers to avoid accessing down peers in follower read and tiflash read(learner read).

What is changed and how it works?

What's Changed: filter the available peers.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • Performance regression
    • Consumes more CPU

Release note

  • fix the problem tidb accesses the down peers in some cases.

@lzmhhh123 lzmhhh123 added type/bugfix This PR fixes a bug. priority/release-blocker This issue blocks a release. Please solve it ASAP. component/tikv needs-cherry-pick-4.0 labels May 21, 2020
@lzmhhh123 lzmhhh123 requested review from lysu, bobotu and zz-jason May 21, 2020 09:11
@lzmhhh123
Copy link
Contributor Author

/run-check_dev_2

overvenus
overvenus previously approved these changes May 21, 2020
Copy link
Member

@overvenus overvenus left a comment

Choose a reason for hiding this comment

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

LGTM

@lzmhhh123
Copy link
Contributor Author

/run-unit-test

@codecov
Copy link

codecov bot commented May 21, 2020

Codecov Report

Merging #17337 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #17337   +/-   ##
===========================================
  Coverage   79.8439%   79.8439%           
===========================================
  Files           520        520           
  Lines        139943     139943           
===========================================
  Hits         111736     111736           
  Misses        19236      19236           
  Partials       8971       8971           

@lzmhhh123 lzmhhh123 requested a review from tiancaiamao May 21, 2020 09:46
store/tikv/region_cache.go Outdated Show resolved Hide resolved
Co-authored-by: Zejun Li <me@bobotu.dev>
Copy link
Contributor

@bobotu bobotu left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot sre-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 21, 2020
@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

Your auto merge job has been accepted, waiting for:

  • 16248

@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

Your auto merge job has been accepted, waiting for:

  • 16248
  • 16248

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

@lzmhhh123 merge failed.

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

@lzmhhh123 merge failed.

@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

@lzmhhh123 merge failed.

@zz-jason
Copy link
Member

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

/run-all-tests

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

@lzmhhh123 merge failed.

@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

/run-all-tests

@lzmhhh123
Copy link
Contributor Author

/merge

1 similar comment
@lzmhhh123
Copy link
Contributor Author

/merge

@sre-bot sre-bot merged commit d5aaaae into pingcap:master May 21, 2020
@lzmhhh123 lzmhhh123 deleted the bug-fix/filter_the_deleted_peers branch May 21, 2020 12:17
sre-bot pushed a commit to sre-bot/tidb that referenced this pull request May 21, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor

sre-bot commented May 21, 2020

cherry pick to release-4.0 in PR #17342

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. status/can-merge Indicates a PR has been approved by a committer. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

region cache contain the down peers
5 participants