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.03 - fix: change default compression to zstd:3 #7023

Merged
merged 1 commit into from
Dec 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
2 changes: 1 addition & 1 deletion dgraph/cmd/bulk/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func init() {
" The key size indicates the chosen AES encryption (AES-128/192/256 respectively). "+
" This key is used to encrypt the output data directories and to decrypt the input "+
" schema and data files (if encrytped). Enterprise feature.")
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 @@ -65,6 +65,8 @@ func RunRestore(pdir, location, backupId, keyfile string) LoadResult {
// 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