From 99678970e1ea05f7905a31a174c4d32a84fa53b5 Mon Sep 17 00:00:00 2001 From: "will@2012" Date: Sat, 14 Sep 2024 16:28:33 +0800 Subject: [PATCH] chore: update versadb default config --- triedb/versiondb/versadb.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/triedb/versiondb/versadb.go b/triedb/versiondb/versadb.go index 95ac82d7d..681728b41 100644 --- a/triedb/versiondb/versadb.go +++ b/triedb/versiondb/versadb.go @@ -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) }