From 8a440e753ff51973c467553527dd29a9741d237a Mon Sep 17 00:00:00 2001 From: wayen <2229306838@qq.com> Date: Mon, 18 Dec 2023 13:11:17 +0800 Subject: [PATCH] fix: fix the pebble config of level option (#2072) --- ethdb/pebble/pebble.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ethdb/pebble/pebble.go b/ethdb/pebble/pebble.go index 85cbe8375..561524c0a 100644 --- a/ethdb/pebble/pebble.go +++ b/ethdb/pebble/pebble.go @@ -46,6 +46,9 @@ const ( // metricsGatheringInterval specifies the interval to retrieve pebble database // compaction, io and pause stats to report to the user. metricsGatheringInterval = 3 * time.Second + + // numLevels is the level number of pebble sst files + numLevels = 7 ) // Database is a persistent key-value store based on the pebble storage engine. @@ -196,6 +199,7 @@ func New(file string, cache int, handles int, namespace string, readonly bool) ( WriteStallBegin: db.onWriteStallBegin, WriteStallEnd: db.onWriteStallEnd, }, + Levels: make([]pebble.LevelOptions, numLevels), Logger: panicLogger{}, // TODO(karalabe): Delete when this is upstreamed in Pebble }