chore: update versadb default config

This commit is contained in:
will@2012 2024-09-14 16:28:33 +08:00
parent 6d082af0f3
commit 99678970e1

@ -29,11 +29,20 @@ func New(config *Config) *VersionDB {
if config != nil { if config != nil {
path = config.Path path = config.Path
cfg = &versa.VersaDBConfig{ cfg = &versa.VersaDBConfig{
FlushInterval: config.FlushInterval, FlushInterval: 2000,
MaxStatesInMem: config.MaxStatesInMem, MaxStatesInMem: 128,
MemLowWaterMark: 40,
MemHighWaterMark: 60,
MemEvictInternal: 200,
} }
} }
db, err := versa.NewVersaDB(path, cfg) db, err := versa.NewVersaDB(path, &versa.VersaDBConfig{
FlushInterval: 2000,
MaxStatesInMem: 128,
MemLowWaterMark: 40,
MemHighWaterMark: 60,
MemEvictInternal: 200,
})
if err != nil { if err != nil {
log.Crit("failed to new version db", "error", err) log.Crit("failed to new version db", "error", err)
} }