mirror of https://github.com/hashicorp/consul
Increase maximum MDB map size
parent
c78cc37f0b
commit
0bbd4a71e7
|
@ -13,6 +13,7 @@ const (
|
|||
dbNodes = "nodes" // Maps node -> addr
|
||||
dbServices = "services" // Maps node||serv -> structs.NodeService
|
||||
dbServiceIndex = "serviceIndex" // Maps serv||tag||node -> structs.ServiceNode
|
||||
dbMaxMapSize = 1024 * 1024 * 1024 // 1GB maximum size
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -86,6 +87,11 @@ func (s *StateStore) initialize() error {
|
|||
return err
|
||||
}
|
||||
|
||||
// Increase the maximum map size
|
||||
if err := s.env.SetMapSize(dbMaxMapSize); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Optimize our flags for speed over safety, since the Raft log + snapshots
|
||||
// are durable. We treat this as an ephemeral in-memory DB, since we nuke
|
||||
// the data anyways.
|
||||
|
|
Loading…
Reference in New Issue