[go: up one dir, main page]

Skip to content

Raft: Add election and failover abilities to replicas

After #6464 is done, a partition can add a read-only replica and start to replicate log entries from the primary. This issue tracks the work of converting them to fully functional replicas.

Only the primary is capable of serving requests. Other nodes reject them immediately. The routing will the added later in #6465.

The work consists of:

  • Revisit the implementation of Raft Manager and Transaction. Ensure they work well during election and failover.
  • Add the election and failover ability to the Raft manager. It is mostly handled by the Raft manager, but we need a lot of unit tests to verify the correctness. Pay extra attention to network partition cases.
  • Advance test-raft job. Spawn a 3-node cluster and verify the results when tearing down.
  • A gRPC handler to handle promoting.
  • Add a new Gitaly subcommand.
Edited by Quang-Minh Nguyen
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information