Increase maximum MDB map size

pull/19/head
Armon Dadgar 2013-12-31 17:43:05 -08:00
parent c78cc37f0b
commit 0bbd4a71e7
1 changed files with 9 additions and 3 deletions

View File

@ -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.