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

Alpha: Enable bloom filter caching #5552

Merged
merged 1 commit into from
Jun 1, 2020
Merged
Show file tree
Hide file tree
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
6 changes: 2 additions & 4 deletions dgraph/cmd/debug/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -767,10 +767,8 @@ func run() {
}
bopts := badger.DefaultOptions(dir).
WithTableLoadingMode(options.MemoryMap).
WithReadOnly(opt.readOnly).WithEncryptionKey(enc.ReadEncryptionKeyFile(opt.keyFile))

// TODO(Ibrahim): Remove this once badger is updated.
bopts.ZSTDCompressionLevel = 1
WithReadOnly(opt.readOnly).
WithEncryptionKey(enc.ReadEncryptionKeyFile(opt.keyFile))

x.AssertTruef(len(bopts.Dir) > 0, "No posting or wal dir specified.")
fmt.Printf("Opening DB: %s\n", bopts.Dir)
Expand Down
3 changes: 1 addition & 2 deletions testutil/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ var KeyFile string

func openDgraph(pdir string) (*badger.DB, error) {
opt := badger.DefaultOptions(pdir).WithTableLoadingMode(options.MemoryMap).
// TOOD(Ibrahim): Remove compression level once badger is updated.
WithReadOnly(true).WithZSTDCompressionLevel(1).
WithReadOnly(true).
WithEncryptionKey(enc.ReadEncryptionKeyFile(KeyFile))
return badger.OpenManaged(opt)
}
Expand Down
3 changes: 2 additions & 1 deletion worker/server_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,8 @@ func (s *ServerState) initStorage() {
WithNumVersionsToKeep(math.MaxInt32).
WithMaxCacheSize(1 << 30).
WithKeepBlockIndicesInCache(true).
WithKeepBlocksInCache(true)
WithKeepBlocksInCache(true).
WithMaxBfCacheSize(500 << 20) // 500 MB of bloom filter cache.
opt = setBadgerOptions(opt)

// Print the options w/o exposing key.
Expand Down