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

[Lease] Refactor lease renew request via raft #14094

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Mar 7, 2023

  1. lease: add a lease_new request into raft_internal.proto

    Executed:
    1. ./scripts/genproto.sh
    2. ./scripts/update_proto_annotations.sh
    
    Signed-off-by: Benjamin Wang <wachao@vmware.com>
    ahrtr committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    8ba1e26 View commit details
    Browse the repository at this point in the history
  2. lease: process renew request via raft

    Previously, the renew request can only be processed by the leader.
    If a follower receives the renew request, it just forwards the
    request to the leader via a internal http channel. This isn't
    accurate because the leader may change during the process.
    
    When a leader receives the renew request, the previous implementation
    follows a three stage workflow: pre-raft, raft and post-raft. It's
    too complicated and error prone, and the raft is more like just a
    network transport channel instead of a concensus mechanism in this
    case.
    
    So we process the renew request via raft directly, it can greatly
    simplify the code.
    
    Signed-off-by: Benjamin Wang <wachao@vmware.com>
    ahrtr committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    67051dc View commit details
    Browse the repository at this point in the history
  3. etcdserver: process lease Renew request via raft when clusterVersion …

    …>= 3.6
    
    Signed-off-by: Benjamin Wang <wachao@vmware.com>
    ahrtr committed Mar 7, 2023
    Configuration menu
    Copy the full SHA
    bafc656 View commit details
    Browse the repository at this point in the history