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: recheck kv status before invalidate region on sending fail (#16933) #16956

Merged
merged 4 commits into from
May 5, 2020

Conversation

sre-bot
Copy link
Contributor

@sre-bot sre-bot commented Apr 30, 2020

cherry-pick #16933 to release-4.0


What problem does this PR solve?

Problem Summary:

the simple and cherry-pickable part of #15989

do addition kv status check before invalidate region to avoid false-invalidate region cache when tikv isn't down but sending request failure(like meet network timeout).

What is changed and how it works?

Proposal: xxx

What's Changed:

do addition kv status check before invalidate region

How it Works:

do addition kv status check before invalidate region

and add metric to new check operation.

if status API unavaliable tidb will works as code before this pr

Related changes

  • Need to cherry-pick to the release branch 4.0 to help large-txn test

Check List

Tests

  • Unit test
  • Integration test

Side effects

  • n/a

Release note

recheck kv status before invalidating region on sending fail


This change is Reviewable

Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@@ -1384,8 +1393,13 @@ func (s *Store) reResolve(c *RegionCache) {
addr = store.GetAddress()
if s.addr != addr {
state := resolved
<<<<<<< HEAD
Copy link
Contributor

Choose a reason for hiding this comment

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

Please address conflict @lysu

Copy link
Contributor

Choose a reason for hiding this comment

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

done~

@lysu
Copy link
Contributor

lysu commented Apr 30, 2020

/run-all-tests

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

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

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/merge

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

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

@sre-bot merge failed.

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/run-integration-copr-test

@jackysp
Copy link
Member

jackysp commented Apr 30, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

Your auto merge job has been accepted, waiting for:

  • 16915
  • 16959

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

/run-all-tests

@sre-bot
Copy link
Contributor Author

sre-bot commented Apr 30, 2020

@sre-bot merge failed.

@jackysp
Copy link
Member

jackysp commented May 5, 2020

/merge

@sre-bot
Copy link
Contributor Author

sre-bot commented May 5, 2020

Your auto merge job has been accepted, waiting for:

  • 16959

@sre-bot
Copy link
Contributor Author

sre-bot commented May 5, 2020

/run-all-tests

@sre-bot sre-bot merged commit bc6b901 into pingcap:release-4.0 May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config component/tikv status/can-merge Indicates a PR has been approved by a committer. 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.

5 participants