Skip to content

Commit

Permalink
fix(bulk loader): Remove redundant option set (#6119)
Browse files Browse the repository at this point in the history
The compression level is set in the `setBadgerOptions` function and setting
`compressionLevel` before calling that function is a no-op since we will
overwrite the value in the `setBadgerOptions` function.

This PR removes the redundant setting of the option.
  • Loading branch information
Ibrahim Jarif authored Aug 6, 2020
1 parent bb8e4b9 commit 885ef67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dgraph/cmd/bulk/reduce.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (r *reducer) createBadgerInternal(dir string, compression bool) *badger.DB
opt := badger.DefaultOptions(dir).WithSyncWrites(false).
WithTableLoadingMode(bo.MemoryMap).WithValueThreshold(1 << 10 /* 1 KB */).
WithLogger(nil).WithMaxCacheSize(1 << 20).
WithEncryptionKey(r.opt.EncryptionKey).WithCompression(bo.None)
WithEncryptionKey(r.opt.EncryptionKey)

// Overwrite badger options based on the options provided by the user.
r.setBadgerOptions(&opt, compression)
Expand Down

0 comments on commit 885ef67

Please sign in to comment.