Implement checking wether snapshot is in progress before continuing

This commit is contained in:
Kelvin Clement Mwinuka
2024-01-27 01:46:16 +08:00
parent 4895b109b8
commit 7e59de20a2
6 changed files with 42 additions and 15 deletions

View File

@@ -144,10 +144,10 @@ func (r *Raft) HasJoinedCluster() bool {
}
func (r *Raft) AddVoter(
id raft.ServerID,
address raft.ServerAddress,
prevIndex uint64,
timeout time.Duration,
id raft.ServerID,
address raft.ServerAddress,
prevIndex uint64,
timeout time.Duration,
) error {
if r.IsRaftLeader() {
raftConfig := r.raft.GetConfiguration()