]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commit
Introduce library-independent default compression level
authorAndrew Kryczka <andrewkr@fb.com>
Thu, 24 May 2018 01:33:00 +0000 (18:33 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 24 May 2018 01:42:08 +0000 (18:42 -0700)
commit01bcc348966566e9cd465a04d8f620d7b68f7785
treeddf788dcff1fa8ee1c62910d573b1ee0661f0cb1
parent4011012d9d92658d38cdeaba310bec9189ee4d6d
Introduce library-independent default compression level

Summary:
Previously we were using -1 as the default for every library, which was legacy from our zlib options. That worked for a while, but after zstd introduced https://github.com/facebook/zstd/commit/a146ee04ae5866b948be0c1911418e0436d80cb4, it started giving poor compression ratios by default in zstd.

This PR adds a constant to RocksDB public API, `CompressionOptions::kDefaultCompressionLevel`, which will get translated to the default value specific to the compression library being used in "util/compression.h". The constant uses a number that appears to be larger than any library's maximum compression level.
Closes https://github.com/facebook/rocksdb/pull/3895

Differential Revision: D8125780

Pulled By: ajkr

fbshipit-source-id: 2db157a89118cd4f94577c2f4a0a5ff31c8391c6
HISTORY.md
include/rocksdb/advanced_options.h
include/rocksdb/options.h
util/compression.h