fix: change version db config

This commit is contained in:
joeylichang 2024-10-15 10:25:10 +08:00
parent 6d41ff8190
commit 1c8fb28c99

@ -29,20 +29,14 @@ func New(config *Config) *VersionDB {
if config != nil { if config != nil {
path = config.Path path = config.Path
cfg = &versa.VersaDBConfig{ cfg = &versa.VersaDBConfig{
FlushInterval: 2000, FlushInterval: 6000,
MaxStatesInMem: 128, MaxStatesInMem: 128,
MemLowWaterMark: 40,
MemHighWaterMark: 60,
MemEvictInternal: 200,
} }
_ = cfg _ = cfg
} }
db, err := versa.NewVersaDB(path, &versa.VersaDBConfig{ db, err := versa.NewVersaDB(path, &versa.VersaDBConfig{
FlushInterval: 2000, FlushInterval: 6000,
MaxStatesInMem: 128, 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)