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

tso: make follower fail fast for tso requests (#2614) #2622

Merged
merged 4 commits into from
Jul 10, 2020

Conversation

ti-srebot
Copy link
Contributor

cherry-pick #2614 to release-4.0


Signed-off-by: disksing i@disksing.com

What problem does this PR solve?

It takes too long (20s) for a follower PD to return an error to client. It may cause a longer unavailable time when PD leader changes.
Note: The client will not wait for 20s, but will timeout after 3 seconds.

What is changed and how it works?

Check lease before alloc ts.

Check List

Tests

  • Unit test

Related changes

  • Need to cherry-pick to the release branch

Release note

  • Fix the issue that the TSO request may take too long when PD leader switches

Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
@ti-srebot ti-srebot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. type/bugfix This PR fixes a bug. type/cherry-pick labels Jul 9, 2020
@ti-srebot ti-srebot added this to the v4.0.3 milestone Jul 9, 2020
@HunDunDM
Copy link
Member

HunDunDM commented Jul 9, 2020

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 9, 2020
@ti-srebot
Copy link
Contributor Author

@HunDunDM,Thanks for your review.

@disksing disksing removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 9, 2020
Copy link
Member

@JmPotato JmPotato left a comment

Choose a reason for hiding this comment

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

LGTM

@JmPotato
Copy link
Member

JmPotato commented Jul 9, 2020

/run-all-tests

@disksing
Copy link
Contributor

/run-integration-ddl-test

@disksing disksing merged commit 72fe970 into tikv:release-4.0 Jul 10, 2020
@disksing disksing deleted the release-4.0-3910d2b0c4f6 branch July 10, 2020 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/LGT1 Indicates that a PR has LGTM 1. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants