From dbd6a95dc9f6ddd016926a9339ebcefb12907d75 Mon Sep 17 00:00:00 2001 From: Cedric Fung Date: Fri, 11 Aug 2023 21:17:01 +0000 Subject: [PATCH] badger increases the compaction threshold to delay panic --- storage/badger.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/badger.go b/storage/badger.go index ae7c66f14..74f4da2a9 100644 --- a/storage/badger.go +++ b/storage/badger.go @@ -49,7 +49,8 @@ func openDB(dir string, sync bool, custom *config.Custom) (*badger.DB, error) { opts = opts.WithBlockCacheSize(0) opts = opts.WithIndexCacheSize(0) opts = opts.WithMetricsEnabled(false) - opts = opts.WithLoggingLevel(badger.ERROR) + opts = opts.WithLoggingLevel(badger.WARNING) + opts = opts.WithLevelSizeMultiplier(16) // FIXME badger panic on compaction db, err := badger.Open(opts) if err != nil { return nil, err