Separate Dgraph compression level config for p and w directories


What version of Dgraph are you using?

v20.03.4

Have you tried reproducing the issue with the latest release?

Yes (v20.07.0)

What is the hardware spec (RAM, OS)?

Linux

Steps to reproduce the issue (command/config used to run Dgraph).

When running Alpha, I want to have compression enabled for the p directory, but turn off compression for the w directory. In v20.03 and v20.07, there’s a --badger.compresson_level flag that takes a single int that sets the compression level for both.

$ dgraph alpha --help
...
      --badger.compression_level int     The compression level for Badger. A higher value uses more resources. (default 3)
...

Expected behaviour and actual result.

There’s no option to set the compression level for one or the other.

The flag should take in two values to set per directory.

Fixed in master: https://github.com/dgraph-io/dgraph/pull/6401/
PRs for other branches:
v1.2: https://github.com/dgraph-io/dgraph/pull/6419
v20.03: https://github.com/dgraph-io/dgraph/pull/6420
v20.07: https://github.com/dgraph-io/dgraph/pull/6421

1 Like