mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-07 08:50:59 +08:00
Added snapshot interval value to raft configuration
This commit is contained in:
@@ -40,6 +40,7 @@ func (r *Raft) RaftInit(ctx context.Context) {
|
||||
raftConfig := raft.DefaultConfig()
|
||||
raftConfig.LocalID = raft.ServerID(conf.ServerID)
|
||||
raftConfig.SnapshotThreshold = 5
|
||||
raftConfig.SnapshotInterval = 5 * time.Second
|
||||
|
||||
var logStore raft.LogStore
|
||||
var stableStore raft.StableStore
|
||||
|
Reference in New Issue
Block a user