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) #3719

Merged

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #3712

Signed-off-by: nolouch [email protected]

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

@ti-chi-bot ti-chi-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/cherry-pick-not-approved type/cherry-pick-for-release-5.0 The PR belongs to release-5.0 cherry pick. labels May 27, 2021
@ti-chi-bot ti-chi-bot requested review from disksing and rleungx May 27, 2021 12:44
Signed-off-by: nolouch <[email protected]>
@codecov
Copy link

codecov bot commented May 27, 2021

Codecov Report

Merging #3719 (b67427a) into release-5.0 (8a2cfe9) will decrease coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           release-5.0    #3719      +/-   ##
===============================================
- Coverage        74.60%   74.54%   -0.06%     
===============================================
  Files              245      245              
  Lines            24140    24149       +9     
===============================================
- Hits             18010    18003       -7     
- Misses            4513     4523      +10     
- Partials          1617     1623       +6     
Flag Coverage Δ
unittests 74.54% <100.00%> (-0.06%) ⬇️

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

Impacted Files Coverage Δ
server/cluster/cluster.go 82.95% <100.00%> (+0.02%) ⬆️
server/server.go 72.93% <100.00%> (+0.02%) ⬆️
pkg/tempurl/tempurl.go 45.00% <0.00%> (-15.00%) ⬇️
server/region_syncer/server.go 83.33% <0.00%> (-6.07%) ⬇️
pkg/etcdutil/etcdutil.go 84.70% <0.00%> (-3.53%) ⬇️
server/schedule/operator/step.go 67.44% <0.00%> (-1.67%) ⬇️
tools/pd-ctl/pdctl/command/operator.go 65.99% <0.00%> (-1.22%) ⬇️
server/handler.go 41.97% <0.00%> (-0.50%) ⬇️
server/grpc_service.go 46.94% <0.00%> (-0.23%) ⬇️
... and 4 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 8a2cfe9...b67427a. Read the comment docs.

@zhouqiang-cl zhouqiang-cl added the cherry-pick-approved Cherry pick PR approved by release team. label May 27, 2021
@nolouch
Copy link
Contributor

nolouch commented May 28, 2021

PTAL @rleungx @JmPotato

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label May 28, 2021
@nolouch
Copy link
Contributor

nolouch commented May 28, 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

@nolouch: /merge in this pull request requires 2 /lgtm.

In response to this:

/merge

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

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • JmPotato
  • nolouch

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 writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@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 May 28, 2021
@nolouch
Copy link
Contributor

nolouch commented May 28, 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: d83603e

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label May 28, 2021
@ti-chi-bot ti-chi-bot merged commit 04ed1ff into tikv:release-5.0 May 28, 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-5.0 The PR belongs to release-5.0 cherry pick.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants