fix: fix the pebble config of level option (#2072)

This commit is contained in:
wayen 2023-12-18 13:11:17 +08:00 committed by GitHub
parent 8205fdc525
commit 8a440e753f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -46,6 +46,9 @@ const (
// metricsGatheringInterval specifies the interval to retrieve pebble database // metricsGatheringInterval specifies the interval to retrieve pebble database
// compaction, io and pause stats to report to the user. // compaction, io and pause stats to report to the user.
metricsGatheringInterval = 3 * time.Second 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. // 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, WriteStallBegin: db.onWriteStallBegin,
WriteStallEnd: db.onWriteStallEnd, WriteStallEnd: db.onWriteStallEnd,
}, },
Levels: make([]pebble.LevelOptions, numLevels),
Logger: panicLogger{}, // TODO(karalabe): Delete when this is upstreamed in Pebble Logger: panicLogger{}, // TODO(karalabe): Delete when this is upstreamed in Pebble
} }