Skip to content

DefaultOptions: Set KeepL0InMemory to false #1345

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

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Changes from all commits
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
5 changes: 3 additions & 2 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func DefaultOptions(path string) Options {
SyncWrites: true,
NumVersionsToKeep: 1,
CompactL0OnClose: true,
KeepL0InMemory: true,
KeepL0InMemory: false,
VerifyValueChecksum: false,
Compression: options.None,
MaxCacheSize: 0,
Expand Down Expand Up @@ -454,6 +454,7 @@ func (opt Options) WithNumCompactors(val int) Options {
// CompactL0OnClose determines whether Level 0 should be compacted before closing the DB.
// This ensures that both reads and writes are efficient when the DB is opened later.
// CompactL0OnClose is set to true if KeepL0InMemory is set to true.
//
// The default value of CompactL0OnClose is true.
func (opt Options) WithCompactL0OnClose(val bool) Options {
opt.CompactL0OnClose = val
Expand Down Expand Up @@ -501,7 +502,7 @@ func (opt Options) WithEncryptionKeyRotationDuration(d time.Duration) Options {
// will take longer to complete since memtables and all level 0 tables will have to be recreated.
// This option also sets CompactL0OnClose option to true.
//
// The default value of KeepL0InMemory is true.
// The default value of KeepL0InMemory is false.
func (opt Options) WithKeepL0InMemory(val bool) Options {
opt.KeepL0InMemory = val
return opt
Expand Down