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

server: make leader can lost lease as soon as possible (#3712) #3718

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #3712

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

What problem does this PR solve?

Fix #3697
When the store's number is 180. we resign pd leader may need one minute or more to finish elect the new leader:
image

details replay: https://gist.github.com/disksing/a1bf78007b674da7e15b52a9e25eb3a5

What is changed and how it works?

make leader can be lost lease as soon as possible

Check List

Tests

  • Integration test

Release note

Fix the issue that leader re-election be slow when there are many stores

Signed-off-by: ti-chi-bot <ti-community-prow-bot@tidb.io>
@ti-chi-bot ti-chi-bot added do-not-merge/cherry-pick-not-approved release-note Denotes a PR that will be considered when it comes time to generate release notes. type/cherry-pick-for-release-4.0 The PR belongs to release-4.0 cherry pick. labels May 27, 2021
@ti-chi-bot
Copy link
Member Author

@ti-chi-bot: This cherry pick PR is for a release branch and has not yet been approved by release team.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick, it must first be approved (/lgtm + /merge) by the collaborators.

AFTER it has been approved by collaborators, please ping the release team in a comment to request a cherry pick review.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nolouch nolouch removed their assignment May 31, 2021
@zhangjinpeng87
Copy link
Member

@nolouch Please fix the conflicts

@disksing disksing removed their request for review June 29, 2021 03:17
nolouch and others added 2 commits July 5, 2021 19:24
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
@nolouch nolouch force-pushed the cherry-pick-3712-to-release-4.0 branch from 65a7726 to e298cd9 Compare July 5, 2021 11:39
@nolouch nolouch requested review from JmPotato and rleungx and removed request for nolouch July 5, 2021 11:41
@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Jul 5, 2021
@zhouqiang-cl zhouqiang-cl added backport-4.0.14 cherry-pick-approved Cherry pick PR approved by release team. labels Jul 6, 2021
Signed-off-by: nolouch <nolouch@gmail.com>
Signed-off-by: nolouch <nolouch@gmail.com>
@ti-chi-bot
Copy link
Member Author

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • rleungx

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added status/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 6, 2021
@codecov
Copy link

codecov bot commented Jul 6, 2021

Codecov Report

Merging #3718 (852a4d2) into release-4.0 (4a50ce9) will increase coverage by 0.38%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-4.0    #3718      +/-   ##
===============================================
+ Coverage        74.72%   75.11%   +0.38%     
===============================================
  Files              211      211              
  Lines            19940    19952      +12     
===============================================
+ Hits             14901    14987      +86     
+ Misses            3701     3623      -78     
- Partials          1338     1342       +4     
Flag Coverage Δ
unittests 75.11% <100.00%> (+0.38%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
server/cluster/cluster.go 80.85% <100.00%> (+2.27%) ⬆️
server/server.go 74.43% <100.00%> (+0.46%) ⬆️
pkg/tempurl/tempurl.go 60.00% <0.00%> (-10.00%) ⬇️
server/region_syncer/client.go 78.74% <0.00%> (-4.73%) ⬇️
server/tso/tso.go 78.98% <0.00%> (-2.18%) ⬇️
server/core/storage.go 67.53% <0.00%> (-1.74%) ⬇️
pkg/btree/btree.go 85.30% <0.00%> (-0.97%) ⬇️
server/grpc_service.go 59.67% <0.00%> (-0.61%) ⬇️
client/client.go 69.03% <0.00%> (ø)
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4a50ce9...852a4d2. Read the comment docs.

@nolouch
Copy link
Contributor

nolouch commented Jul 6, 2021

/merge

@ti-chi-bot
Copy link
Member Author

@nolouch: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member Author

This pull request has been accepted and is ready to merge.

Commit hash: 03b5127

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jul 6, 2021
@ti-chi-bot ti-chi-bot merged commit 15f0a8c into tikv:release-4.0 Jul 6, 2021
@HunDunDM HunDunDM added this to the v4.0.14 milestone Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick-approved Cherry pick PR approved by release team. release-note Denotes a PR that will be considered when it comes time to generate release notes. status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2. type/cherry-pick-for-release-4.0 The PR belongs to release-4.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants