Skip to content

Conversation

@marsishandsome
Copy link
Collaborator

@marsishandsome marsishandsome commented Nov 2, 2021

Signed-off-by: marsishandsome marsishandsome@gmail.com

What problem does this PR solve?

close #304

When region splits, the region info on PD may not be updated in a few seconds.
Clients should use the new region info in RegionEpochNotMatch ERROR to update the local region cache.

What is changed and how it works?

OnRegionEpochNotMatch removes the old region and inserts new regions into the cache.

ref: https://github.com/tikv/client-go/blob/tidb-5.2/internal/locate/region_request.go#L985

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Code changes

  • Has exported function/method change
  • Has exported variable/fields change
  • Has interface methods change
  • Has persistent data change

Side effects

  • Possible performance regression
  • Increased code complexity
  • Breaking backward compatibility

Related changes

  • Need to cherry-pick to the release branch
  • Need to update the documentation
  • Need to be included in the release note

Signed-off-by: marsishandsome <marsishandsome@gmail.com>
@marsishandsome marsishandsome force-pushed the feature/fix-EpochNotMatch branch from 7bb7e00 to 7e7492e Compare November 2, 2021 08:58
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
@marsishandsome marsishandsome force-pushed the feature/fix-EpochNotMatch branch 3 times, most recently from a06be66 to 959cd20 Compare November 3, 2021 00:53
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
@marsishandsome marsishandsome force-pushed the feature/fix-EpochNotMatch branch from 959cd20 to 09958fd Compare November 3, 2021 01:01
@marsishandsome
Copy link
Collaborator Author

/run-all-tests

Copy link
Collaborator

@birdstorm birdstorm left a comment

Choose a reason for hiding this comment

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

LGTM

@marsishandsome marsishandsome merged commit 9dc2771 into tikv:release-3.1 Nov 3, 2021
marsishandsome added a commit to marsishandsome/client-java that referenced this pull request Dec 1, 2021
marsishandsome added a commit to marsishandsome/client-java that referenced this pull request Dec 1, 2021
Signed-off-by: marsishandsome <marsishandsome@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants