consul: Set maximum raft log size to 128MB

pull/19/head
Armon Dadgar 11 years ago
parent eb4724e47b
commit 32e500e012

@ -27,6 +27,7 @@ const (
serfWANSnapshot = "serf/remote.snapshot"
raftState = "raft/"
snapshotsRetained = 2
raftDBSize = 128 * 1024 * 1024 // Limit Raft log to 128MB
)
// Server is Consul server which manages the service discovery,
@ -219,7 +220,7 @@ func (s *Server) setupRaft() error {
}
// Create the MDB store for logs and stable storage
store, err := raft.NewMDBStore(path)
store, err := raft.NewMDBStoreWithSize(path, raftDBSize)
if err != nil {
return err
}

Loading…
Cancel
Save