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

Feature: Transfer Leader #1221

Merged
merged 1 commit into from
Aug 2, 2024

Commits on Aug 2, 2024

  1. Feature: Transfer Leader

    Call `Raft.trigger().transfer_leader(to)` to inform the raft node to
    transfer its leadership to Node `to`.
    
    This feature is enabled only when: the application uses `RaftNetworkV2`
    and implements the `RaftNetworkV2::transfer_leader()` methods. This method
    provides a default implementation that returns an `Unreachable`, and
    such an error will be just ignored.
    
    Application upgrading Openraft from older version does not need to modify any
    codes, unless TransferLeader is required.
    
    Upgrade tip:
    
    Implement `RaftNetworkV2::transfer_leader()` to send the
    `TransferLeaderRequest` to the target node.
    The target node that receives this request should then pass it to
    `Raft::transfer_leader()`.
    drmingdrmer committed Aug 2, 2024
    Configuration menu
    Copy the full SHA
    7e3ee4f View commit details
    Browse the repository at this point in the history