From 961d8dacf205d225fb75641ab5d98b80900c11ba Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Wed, 26 Jan 2022 09:41:26 -0800 Subject: [PATCH] Remove unused option purge_redundant_kvs_while_flush (#9429) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/9429 Test Plan: fake release for test: D33754513 Reviewed By: riversand963 Differential Revision: D33753637 Pulled By: jay-zhuang fbshipit-source-id: 18db4701e8f28dda8f1ab660c2be9890a8312c12 --- db/c.cc | 4 ---- examples/rocksdb_option_file_example.ini | 1 - include/rocksdb/advanced_options.h | 4 ---- include/rocksdb/c.h | 3 --- options/cf_options.cc | 6 ------ options/cf_options.h | 2 -- options/options_helper.cc | 2 -- options/options_settable_test.cc | 1 - test_util/testutil.cc | 1 - tools/db_bench_tool_test.cc | 1 - 10 files changed, 25 deletions(-) diff --git a/db/c.cc b/db/c.cc index 57f36b73d3..03d422dce7 100644 --- a/db/c.cc +++ b/db/c.cc @@ -2959,10 +2959,6 @@ size_t rocksdb_options_get_manifest_preallocation_size(rocksdb_options_t* opt) { return opt->rep.manifest_preallocation_size; } -// noop -void rocksdb_options_set_purge_redundant_kvs_while_flush( - rocksdb_options_t* /*opt*/, unsigned char /*v*/) {} - void rocksdb_options_set_use_direct_reads(rocksdb_options_t* opt, unsigned char v) { opt->rep.use_direct_reads = v; diff --git a/examples/rocksdb_option_file_example.ini b/examples/rocksdb_option_file_example.ini index dcbc9a308a..bf5fb33044 100644 --- a/examples/rocksdb_option_file_example.ini +++ b/examples/rocksdb_option_file_example.ini @@ -103,7 +103,6 @@ level0_stop_writes_trigger=20 compression=kSnappyCompression level0_file_num_compaction_trigger=4 - purge_redundant_kvs_while_flush=true max_write_buffer_size_to_maintain=0 memtable_factory=SkipListFactory max_grandparent_overlap_factor=8 diff --git a/include/rocksdb/advanced_options.h b/include/rocksdb/advanced_options.h index 2cd2a92849..c6108563a5 100644 --- a/include/rocksdb/advanced_options.h +++ b/include/rocksdb/advanced_options.h @@ -930,10 +930,6 @@ struct AdvancedColumnFamilyOptions { // NOT SUPPORTED ANYMORE -- this options is no longer used unsigned int rate_limit_delay_max_milliseconds = 100; - - // NOT SUPPORTED ANYMORE - // Does not have any effect. - bool purge_redundant_kvs_while_flush = true; }; } // namespace ROCKSDB_NAMESPACE diff --git a/include/rocksdb/c.h b/include/rocksdb/c.h index 3bc3b9b074..94f0962093 100644 --- a/include/rocksdb/c.h +++ b/include/rocksdb/c.h @@ -1250,9 +1250,6 @@ extern ROCKSDB_LIBRARY_API void rocksdb_options_set_manifest_preallocation_size( rocksdb_options_t*, size_t); extern ROCKSDB_LIBRARY_API size_t rocksdb_options_get_manifest_preallocation_size(rocksdb_options_t*); -extern ROCKSDB_LIBRARY_API void -rocksdb_options_set_purge_redundant_kvs_while_flush(rocksdb_options_t*, - unsigned char); extern ROCKSDB_LIBRARY_API void rocksdb_options_set_allow_mmap_reads( rocksdb_options_t*, unsigned char); extern ROCKSDB_LIBRARY_API unsigned char rocksdb_options_get_allow_mmap_reads( diff --git a/options/cf_options.cc b/options/cf_options.cc index 42bf053a84..604aa99eee 100644 --- a/options/cf_options.cc +++ b/options/cf_options.cc @@ -525,10 +525,6 @@ static std::unordered_map {offset_of(&ImmutableCFOptions::force_consistency_checks), OptionType::kBoolean, OptionVerificationType::kNormal, OptionTypeFlags::kNone}}, - {"purge_redundant_kvs_while_flush", - {offset_of(&ImmutableCFOptions::purge_redundant_kvs_while_flush), - OptionType::kBoolean, OptionVerificationType::kDeprecated, - OptionTypeFlags::kNone}}, {"max_mem_compaction_level", {0, OptionType::kInt, OptionVerificationType::kDeprecated, OptionTypeFlags::kNone}}, @@ -853,8 +849,6 @@ ImmutableCFOptions::ImmutableCFOptions(const ColumnFamilyOptions& cf_options) table_properties_collector_factories( cf_options.table_properties_collector_factories), bloom_locality(cf_options.bloom_locality), - purge_redundant_kvs_while_flush( - cf_options.purge_redundant_kvs_while_flush), compression_per_level(cf_options.compression_per_level), level_compaction_dynamic_level_bytes( cf_options.level_compaction_dynamic_level_bytes), diff --git a/options/cf_options.h b/options/cf_options.h index ca2b59fca9..19ecec0694 100644 --- a/options/cf_options.h +++ b/options/cf_options.h @@ -62,8 +62,6 @@ struct ImmutableCFOptions { // to PlainTableOptions just like bloom_bits_per_key uint32_t bloom_locality; - bool purge_redundant_kvs_while_flush; - std::vector compression_per_level; bool level_compaction_dynamic_level_bytes; diff --git a/options/options_helper.cc b/options/options_helper.cc index e4958ccdbc..7f9a991bf6 100644 --- a/options/options_helper.cc +++ b/options/options_helper.cc @@ -293,8 +293,6 @@ void UpdateColumnFamilyOptions(const ImmutableCFOptions& ioptions, cf_opts->table_properties_collector_factories = ioptions.table_properties_collector_factories; cf_opts->bloom_locality = ioptions.bloom_locality; - cf_opts->purge_redundant_kvs_while_flush = - ioptions.purge_redundant_kvs_while_flush; cf_opts->compression_per_level = ioptions.compression_per_level; cf_opts->level_compaction_dynamic_level_bytes = ioptions.level_compaction_dynamic_level_bytes; diff --git a/options/options_settable_test.cc b/options/options_settable_test.cc index f8ee2916af..3628409cf7 100644 --- a/options/options_settable_test.cc +++ b/options/options_settable_test.cc @@ -443,7 +443,6 @@ TEST_F(OptionsSettableTest, ColumnFamilyOptionsAllFieldsSettable) { options->hard_rate_limit = 0; options->soft_rate_limit = 0; options->num_levels = 42; // Initialize options for MutableCF - options->purge_redundant_kvs_while_flush = false; options->max_mem_compaction_level = 0; options->compaction_filter = nullptr; options->sst_partitioner_factory = nullptr; diff --git a/test_util/testutil.cc b/test_util/testutil.cc index 1fb74ab3c3..8f9f23b644 100644 --- a/test_util/testutil.cc +++ b/test_util/testutil.cc @@ -391,7 +391,6 @@ void RandomInitCFOptions(ColumnFamilyOptions* cf_opt, DBOptions& db_options, cf_opt->level_compaction_dynamic_level_bytes = rnd->Uniform(2); cf_opt->optimize_filters_for_hits = rnd->Uniform(2); cf_opt->paranoid_file_checks = rnd->Uniform(2); - cf_opt->purge_redundant_kvs_while_flush = rnd->Uniform(2); cf_opt->force_consistency_checks = rnd->Uniform(2); cf_opt->compaction_options_fifo.allow_compaction = rnd->Uniform(2); cf_opt->memtable_whole_key_filtering = rnd->Uniform(2); diff --git a/tools/db_bench_tool_test.cc b/tools/db_bench_tool_test.cc index 4b42849347..6cd50092d0 100644 --- a/tools/db_bench_tool_test.cc +++ b/tools/db_bench_tool_test.cc @@ -266,7 +266,6 @@ const std::string options_file_content = R"OPTIONS_FILE( inplace_update_support=false compaction_style=kCompactionStyleUniversal memtable_prefix_bloom_probes=6 - purge_redundant_kvs_while_flush=true filter_deletes=false hard_pending_compaction_bytes_limit=0 disable_auto_compactions=false