mirror of
https://github.com/facebook/rocksdb.git
synced 2025-04-19 16:30:36 +08:00
Summary: Leading up to some compression code refactoring, we have a bit of an ifdef nightmare in compression.h relating to zstd support. With the major release RocksDB 10.0.0 coming up, it is a good time to clean up much of this tech debt by requiring zstd >= 1.4.0 (April 2019) if building RocksDB with ZSTD support. For example, Ubuntu 20, the first LTS version to properly support C++17 in its built-in gcc, comes with zstd version 1.4.4. This should not be a significant limitation. * Almost all of the `ZSTD_VERSION_NUMBER` checks are simplified to just `ZSTD`, though * `ROCKSDB_ZSTD_DDICT` still needs to be separate because of dependency on `ZSTD_STATIC_LINKING_ONLY` (added to fbcode_config_platform010.sh by the way) * Similar for ZDICT_finalizeDictionary, which is only generally available in >= 1.4.5 * Eliminate deprecated `kZSTDNotFinalCompression` * Reduce some cases of unnecessary copying definitions across `#if` branches (e.g. `ZSTDUncompressCachedData`) Pull Request resolved: https://github.com/facebook/rocksdb/pull/13362 Test Plan: minor unit test updates. `make check` on several build variants with/without zstd and with/without `ZSTD_STATIC_LINKING_ONLY` Also deflaked DBTest.DynamicLevelCompressionPerLevel which was flaky before this change but failed once in CI Reviewed By: cbi42 Differential Revision: D69129453 Pulled By: pdillinger fbshipit-source-id: ef0cbf9f0fea4e7684fa0999320aa170cfbec233