ignite-3
ignite-3 copied to clipboard
IGNITE-22315 Make raft-client starting only once and only with raft-client and replica together
JIRA Ticket: IGNITE-22315 | Make raft-client starting only once and only with raft-client and replica together
The goal
The goal of the ticket is to remove excessive raft-clients starting.
The reason
If a local node is in assignments, then and only then we should start a whole replication group, that consists of raft-node, raft-client and replica itself. Every entity is a single copy per group and neither should be started outside of the group. Before this ticket every partition started a raft-client.
The solution
- Related completion stage that create raft-client is removed.
- Tests are adjusted for such behavior and check that raft-clients started and updated only on replication group and only.
-
ReplicaManager#startReplica
chains all raft-entities starting together with replica starting to a common future. - Replica manager now handle with replicas starting executor. The motivation do not grab it from table manager is better control of the lifecycle: the executor starts inside replica manager and there is terminated.
-
TableManager#startPartitionAndStartClient
is refactored due to simplicity of the code.
Abandoned PR due to unstable tests flaking is closed