raft: Promote learner node to voter node
Description
This issue tracks the implementation of functionality to promote a learner node to a voter node in the Raft consensus algorithm implementation within Gitaly. This is considered an optimization task as having learner node is not essential but is used for enhanced resilience.
Background
In Raft consensus, nodes can have different roles:
- Voter nodes: Participate in leader election and log replication decisions
- Learner nodes: Receive log entries but don't participate in voting (used for safe cluster membership changes)
Objective
Implement the ability to promote a learner node to become a full voting member of the Raft cluster. This is essential for:
- Dynamic cluster membership management
- Safe scaling of Gitaly clusters
- Protecting the cluster from the risk of running elections and becoming unavailable when there are misconfigurations when a new node is added.
Expected Behavior
- Provide a mechanism to transition a learner node to voter status
- Ensure the promotion process maintains cluster consistency
Acceptance Criteria
-
Learner nodes can be successfully promoted to voter status -
Cluster remains stable during the promotion process -
Documentation updated with promotion procedures
Considerations:
- When a new node is added to the cluster, it is immediately added as a voter, we may need to rework it to be added as a learner instead.
Edited by Emily Chui