Skip to content

Commit

Permalink
Fix comment about LoadBloomsOnOpen (dgraph-io#1478)
Browse files Browse the repository at this point in the history
The comment about LoadBloomsOnOpen was incorrect.
This PR fixes it.
  • Loading branch information
Ibrahim Jarif authored Aug 26, 2020
1 parent a287386 commit 431aee1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,10 @@ func (opt Options) WithBypassLockGuard(b bool) Options {
// WithLoadBloomsOnOpen returns a new Options value with LoadBloomsOnOpen set to the given value.
//
// Badger uses bloom filters to speed up key lookups. When LoadBloomsOnOpen is set
// to false, all bloom filters will be loaded on DB open. This is supposed to
// improve the read speed but it will affect the time taken to open the DB. Set
// this option to true to reduce the time taken to open the DB.
// to false, bloom filters will be loaded lazily and not on DB open. Set this
// option to false to reduce the time taken to open the DB.
//
// The default value of LoadBloomsOnOpen is false.
// The default value of LoadBloomsOnOpen is true.
func (opt Options) WithLoadBloomsOnOpen(b bool) Options {
opt.LoadBloomsOnOpen = b
return opt
Expand Down
4 changes: 2 additions & 2 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ type Options struct {
// ZSTDCompressionLevel is the ZSTD compression level used for compressing blocks.
ZSTDCompressionLevel int

// When LoadBloomsOnOpen is set, bloom filters will be read only when they are accessed.
// Otherwise they will be loaded on table open.
// When LoadBloomsOnOpen is set, bloom filters will be loaded while opening
// the table. Otherwise, they will be loaded lazily when they're accessed.
LoadBloomsOnOpen bool
}

Expand Down

0 comments on commit 431aee1

Please sign in to comment.