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

election: fix the PD leader switch when etcd leader fake unchanged #7846

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Feb 22, 2024

What problem does this PR solve?

Issue Number: close #7780.

What is changed and how does it work?

Check the lessor ID and Raft term during lease keepalive to sense the etcd leader switch as soon as possible.

Check List

Tests

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

Release note

None.

@JmPotato JmPotato added the component/election Election related logic. label Feb 22, 2024
@JmPotato JmPotato requested review from rleungx and HuSharp February 22, 2024 15:44
Copy link
Contributor

ti-chi-bot bot commented Feb 22, 2024

[REVIEW NOTIFICATION]

This pull request has not been approved.

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 bot added release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 22, 2024
@JmPotato JmPotato force-pushed the fix_etcd_leader_sync branch 2 times, most recently from 10b5777 to 48622b7 Compare February 22, 2024 17:18
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Merging #7846 (06ec7dd) into master (d6d9fea) will increase coverage by 0.03%.
Report is 2 commits behind head on master.
The diff coverage is 81.81%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7846      +/-   ##
==========================================
+ Coverage   73.51%   73.55%   +0.03%     
==========================================
  Files         432      432              
  Lines       47913    47964      +51     
==========================================
+ Hits        35225    35278      +53     
- Misses       9642     9648       +6     
+ Partials     3046     3038       -8     
Flag Coverage Δ
unittests 73.55% <81.81%> (+0.03%) ⬆️

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

@JmPotato JmPotato force-pushed the fix_etcd_leader_sync branch from 48622b7 to 06ec7dd Compare February 23, 2024 04:30
@JmPotato
Copy link
Member Author

/hold

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/election Election related logic. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PD may not be able to sense the change of internal raft leader in etcd in time
1 participant