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

Merged
merged 4 commits into from
Jul 9, 2020
Merged

Conversation

disksing
Copy link
Contributor

@disksing disksing commented Jul 7, 2020

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>
@disksing disksing added the type/bugfix This PR fixes a bug. label Jul 7, 2020
@disksing disksing added this to the v4.0.3 milestone Jul 7, 2020
@disksing disksing added needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 7, 2020
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
Signed-off-by: disksing <i@disksing.com>
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

Copy link
Member

@HunDunDM HunDunDM left a comment

Choose a reason for hiding this comment

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

LGTM

@nolouch
Copy link
Contributor

nolouch commented Jul 9, 2020

/merge

@ti-srebot
Copy link
Contributor

Sorry @nolouch, you don't have permission to trigger auto merge event on this branch. The number of LGTM for this PR is 0 while it needs 2 at least

@disksing disksing merged commit 3910d2b into tikv:master Jul 9, 2020
@disksing disksing deleted the tso branch July 9, 2020 13:16
@ti-srebot
Copy link
Contributor

cherry pick to release-4.0 in PR #2622

@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
disksing pushed a commit that referenced this pull request Jul 10, 2020
Signed-off-by: disksing <i@disksing.com>
@AndreMouche
Copy link
Member

LGTM

@ti-srebot
Copy link
Contributor

@AndreMouche, Thanks for your review, however we are sorry that your vote won't be count. You are not a reviewer or committer or co-leader or leader for the related sigs:scheduling(slack).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-4.0 The PR needs to cherry pick to release-4.0 branch. type/bugfix This PR fixes a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants