Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force KeepL0InMemory to be true when InMemory is true #1375

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ 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 it is set or if InMemory is set. We
// shoudln't have L0 on disk in InMemory Mode.
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.
Expand Down