mirror of https://github.com/status-im/consul.git
consul: Reduce the number of raft snapshots we keep
This commit is contained in:
parent
5e790b02a9
commit
e54d8f6c07
|
@ -17,6 +17,7 @@ const (
|
|||
serfLANSnapshot = "serf/local.snapshot"
|
||||
serfWANSnapshot = "serf/remote.snapshot"
|
||||
raftState = "raft/"
|
||||
snapshotsRetained = 2
|
||||
)
|
||||
|
||||
// Server is Consul server which manages the service discovery,
|
||||
|
@ -207,7 +208,7 @@ func (s *Server) setupRaft() error {
|
|||
s.raftStore = store
|
||||
|
||||
// Create the snapshot store
|
||||
snapshots, err := raft.NewFileSnapshotStore(path, 3, s.config.LogOutput)
|
||||
snapshots, err := raft.NewFileSnapshotStore(path, snapshotsRetained, s.config.LogOutput)
|
||||
if err != nil {
|
||||
store.Close()
|
||||
return err
|
||||
|
|
Loading…
Reference in New Issue