From f127d459adddd4d1e381541ac066610df6905f8a Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 8 Jul 2021 10:50:08 -0700 Subject: [PATCH] Add comments to options.bottommost_compression (#8415) Summary: Add comments to options.bottommost_compression for options.num_levels=1 Pull Request resolved: https://github.com/facebook/rocksdb/pull/8415 Reviewed By: ajkr Differential Revision: D29181997 fbshipit-source-id: 5f0f49470f75d796320ecb24d5dc4ef4eb6fbe0f --- include/rocksdb/options.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/rocksdb/options.h b/include/rocksdb/options.h index 30dd2b95d..d21af213d 100644 --- a/include/rocksdb/options.h +++ b/include/rocksdb/options.h @@ -211,14 +211,18 @@ struct ColumnFamilyOptions : public AdvancedColumnFamilyOptions { CompressionType compression; // Compression algorithm that will be used for the bottommost level that - // contain files. + // contain files. The behavior for num_levels = 1 is not well defined. + // Right now, with num_levels = 1, all compaction outputs will use + // bottommost_compression and all flush outputs still use options.compression, + // but the behavior is subject to change. // // Default: kDisableCompressionOption (Disabled) CompressionType bottommost_compression = kDisableCompressionOption; // different options for compression algorithms used by bottommost_compression // if it is enabled. To enable it, please see the definition of - // CompressionOptions. + // CompressionOptions. Behavior for num_levels = 1 is the same as + // options.bottommost_compression. CompressionOptions bottommost_compression_opts; // different options for compression algorithms