Skip to content

Commit

Permalink
Change default compression to zstd:3 (#7023)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajeetdsouza authored Dec 1, 2020
1 parent 54ef639 commit bc35923
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit bc35923

Please sign in to comment.