-
Notifications
You must be signed in to change notification settings - Fork 751
Add PaxosLease package and tests #9969
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
base: master
Are you sure you want to change the base?
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. 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-sigs/prow repository. |
|
[FORMAT CHECKER NOTIFICATION] Notice: To remove the 📖 For more info, you can check the "Linking issues" section in the CONTRIBUTING.md. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Hi @ljluestc. Thanks for your PR. I'm waiting for a tikv member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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-sigs/prow repository. |
|
Thanks for your pull request. Before we can look at it, you'll need to add a 'DCO signoff' to your commits. 📝 Please follow instructions in the contributing guide to update your commits with the DCO Full details of the Developer Certificate of Origin can be found at developercertificate.org. The list of commits missing DCO signoff: 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-sigs/prow repository. I understand the commands that are listed here. |
This PR implements the PaxosLease mechanism for PD leader election, as proposed in issue #1677.
Currently, PD relies heavily on etcd for leader election and TSO timestamp allocation guarantees. This creates a strong dependency on etcd's availability and write latency.
PaxosLease allows PD members to elect a leader using a disk-less Paxos implementation that maintains lease state in memory across a quorum of nodes. This reduces the dependency on etcd writes for lease renewal and allows for potentially faster failure detection and TSO service recovery.
What is changed and how does it work?
I have introduced a new package
pkg/paxosleasethat contains a standalone implementation of the PaxosLease algorithm.Key components:
Logic Flow:
Preparephase.Promiseand any previously accepted values.Accept.