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

release/v20.07 - fix: change default compression on 20.07 to zstd:3 #6995

Merged
merged 1 commit into from
Nov 30, 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
2 changes: 1 addition & 1 deletion dgraph/cmd/bulk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func init() {
"Ignore UIDs in load files and assign new ones.")

// Options around how to set up Badger.
flag.Int("badger.compression_level", 1,
flag.Int("badger.compression_level", 3,
"The compression level for Badger. A higher value uses more resources.")
flag.Int64("badger.cache_mb", 0, "Total size of cache (in MB) per shard in reducer.")
flag.String("badger.cache_percentage", "0,100",
Expand Down
2 changes: 2 additions & 0 deletions worker/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ func RunRestore(pdir, location, backupId string, key x.SensitiveByteSlice) LoadR
// The badger DB should be opened only after creating the backup
// file reader and verifying the encryption in the backup file.
db, err := badger.OpenManaged(badger.DefaultOptions(dir).
WithCompression(options.ZSTD).
WithZSTDCompressionLevel(3).
WithSyncWrites(false).
WithTableLoadingMode(options.MemoryMap).
WithValueThreshold(1 << 10).
Expand Down