mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-07 17:00:56 +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 := raft.DefaultConfig()
|
||||||
raftConfig.LocalID = raft.ServerID(conf.ServerID)
|
raftConfig.LocalID = raft.ServerID(conf.ServerID)
|
||||||
raftConfig.SnapshotThreshold = 5
|
raftConfig.SnapshotThreshold = 5
|
||||||
|
raftConfig.SnapshotInterval = 5 * time.Second
|
||||||
|
|
||||||
var logStore raft.LogStore
|
var logStore raft.LogStore
|
||||||
var stableStore raft.StableStore
|
var stableStore raft.StableStore
|
||||||
|
Reference in New Issue
Block a user