Merge pull request #2708 from will-2012/update-versadb-config

chore: update versadb default config
This commit is contained in:
will-2012 2024-09-14 16:37:30 +08:00 committed by GitHub
commit 5bbfa69f35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -29,11 +29,20 @@ func New(config *Config) *VersionDB {
if config != nil {
path = config.Path
cfg = &versa.VersaDBConfig{
FlushInterval: config.FlushInterval,
MaxStatesInMem: config.MaxStatesInMem,
FlushInterval: 2000,
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 {
log.Crit("failed to new version db", "error", err)
}