From 3e27add3858848da6f320cb3372b7ebf7c079cdc Mon Sep 17 00:00:00 2001 From: Jay Zhuang Date: Wed, 26 Jan 2022 22:02:02 -0800 Subject: [PATCH] Fix a backward compatibility issue (#9456) Summary: Fix a backward compatibility issue caused by removing `purge_redundant_kvs_while_flush`. Reserve the option internally. Pull Request resolved: https://github.com/facebook/rocksdb/pull/9456 Test Plan: CI: https://app.circleci.com/pipelines/github/facebook/rocksdb/11122/workflows/b7bc0f35-1be8-432c-9292-79125e22ecc7/jobs/280595 Reviewed By: ajkr, ltamasi Differential Revision: D33808474 Pulled By: jay-zhuang fbshipit-source-id: 7c3b553bc8e85c8a560514e8e460a2dbaf25718d --- examples/rocksdb_option_file_example.ini | 1 + options/cf_options.cc | 3 +++ options/options_test.cc | 2 ++ 3 files changed, 6 insertions(+) diff --git a/examples/rocksdb_option_file_example.ini b/examples/rocksdb_option_file_example.ini index bf5fb3304..dcbc9a308 100644 --- a/examples/rocksdb_option_file_example.ini +++ b/examples/rocksdb_option_file_example.ini @@ -103,6 +103,7 @@ 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/options/cf_options.cc b/options/cf_options.cc index 604aa99ee..f7abb7874 100644 --- a/options/cf_options.cc +++ b/options/cf_options.cc @@ -509,6 +509,9 @@ static std::unordered_map {"compaction_measure_io_stats", {0, OptionType::kBoolean, OptionVerificationType::kDeprecated, OptionTypeFlags::kNone}}, + {"purge_redundant_kvs_while_flush", + {0, OptionType::kBoolean, OptionVerificationType::kDeprecated, + OptionTypeFlags::kNone}}, {"inplace_update_support", {offset_of(&ImmutableCFOptions::inplace_update_support), OptionType::kBoolean, OptionVerificationType::kNormal, diff --git a/options/options_test.cc b/options/options_test.cc index e547036ca..95521f1f0 100644 --- a/options/options_test.cc +++ b/options/options_test.cc @@ -93,6 +93,7 @@ TEST_F(OptionsTest, GetOptionsFromMapTest) { {"inplace_update_support", "true"}, {"report_bg_io_stats", "true"}, {"compaction_measure_io_stats", "false"}, + {"purge_redundant_kvs_while_flush", "false"}, {"inplace_update_num_locks", "25"}, {"memtable_prefix_bloom_size_ratio", "0.26"}, {"memtable_whole_key_filtering", "true"}, @@ -2255,6 +2256,7 @@ TEST_F(OptionsOldApiTest, GetOptionsFromMapTest) { {"inplace_update_support", "true"}, {"report_bg_io_stats", "true"}, {"compaction_measure_io_stats", "false"}, + {"purge_redundant_kvs_while_flush", "false"}, {"inplace_update_num_locks", "25"}, {"memtable_prefix_bloom_size_ratio", "0.26"}, {"memtable_whole_key_filtering", "true"},