raft: Apply default replica placement strategy in metadata Raft group
A prior commit implements a ring-based replica placement strategy. This commit applies that strategy in the statemachine of the metadata Raft group. This approach ensures all members of the metadata Raft group yield the same replica groups for the cluster. Due to the nondeterministic characteristics of a Raft cluster, a node might have a different review point between its persistent state vs the actual state of the cluster. For example, consider this scenario. At the time storage A registers, there is no other storage, hence it has no replica groups. Right after storage A persists its empty replica groups, new registration from storage B changes the replica group list of A in the cluster. Storage A is not aware of this change. We don't try to address that gap now. Any change of a storage's replica group is expensive. It might lead to massive data replication or deletion on a node. So, we'll defer handling replica group changes to later.
parent
cc20c106
Showing
- internal/gitaly/storage/raft/manager_test.go 22 additions, 6 deletionsinternal/gitaly/storage/raft/manager_test.go
- internal/gitaly/storage/raft/metadata_group_test.go 9 additions, 3 deletionsinternal/gitaly/storage/raft/metadata_group_test.go
- internal/gitaly/storage/raft/metadata_statemachine.go 11 additions, 8 deletionsinternal/gitaly/storage/raft/metadata_statemachine.go
- internal/gitaly/storage/raft/metadata_statemachine_test.go 68 additions, 6 deletionsinternal/gitaly/storage/raft/metadata_statemachine_test.go
Please register or sign in to comment