diff --git a/db.go b/db.go index fd3e85ace..2234843f2 100644 --- a/db.go +++ b/db.go @@ -218,6 +218,8 @@ func Open(opt Options) (db *DB, err error) { if opt.Compression == options.ZSTD && !y.CgoEnabled { return nil, y.ErrZstdCgo } + // Keep L0 in memory if either KeepL0InMemory is set or if InMemory is set. + opt.KeepL0InMemory = opt.KeepL0InMemory || opt.InMemory // Compact L0 on close if either it is set or if KeepL0InMemory is set. When // keepL0InMemory is set we need to compact L0 on close otherwise we might lose data.