|
|
|
@ -97,6 +97,10 @@ TEST_F(OptionsTest, GetOptionsFromMapTest) { |
|
|
|
|
{"min_partial_merge_operands", "31"}, |
|
|
|
|
{"prefix_extractor", "fixed:31"}, |
|
|
|
|
{"optimize_filters_for_hits", "true"}, |
|
|
|
|
{"enable_blob_files", "true"}, |
|
|
|
|
{"min_blob_size", "1K"}, |
|
|
|
|
{"blob_file_size", "1G"}, |
|
|
|
|
{"blob_compression_type", "kZSTD"}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> db_options_map = { |
|
|
|
@ -221,6 +225,10 @@ TEST_F(OptionsTest, GetOptionsFromMapTest) { |
|
|
|
|
ASSERT_EQ(new_cf_opt.optimize_filters_for_hits, true); |
|
|
|
|
ASSERT_EQ(std::string(new_cf_opt.prefix_extractor->Name()), |
|
|
|
|
"rocksdb.FixedPrefix.31"); |
|
|
|
|
ASSERT_EQ(new_cf_opt.enable_blob_files, true); |
|
|
|
|
ASSERT_EQ(new_cf_opt.min_blob_size, 1ULL << 10); |
|
|
|
|
ASSERT_EQ(new_cf_opt.blob_file_size, 1ULL << 30); |
|
|
|
|
ASSERT_EQ(new_cf_opt.blob_compression_type, kZSTD); |
|
|
|
|
|
|
|
|
|
cf_options_map["write_buffer_size"] = "hello"; |
|
|
|
|
ASSERT_NOK(GetColumnFamilyOptionsFromMap(exact, base_cf_opt, cf_options_map, |
|
|
|
@ -1500,6 +1508,10 @@ TEST_F(OptionsOldApiTest, GetOptionsFromMapTest) { |
|
|
|
|
{"min_partial_merge_operands", "31"}, |
|
|
|
|
{"prefix_extractor", "fixed:31"}, |
|
|
|
|
{"optimize_filters_for_hits", "true"}, |
|
|
|
|
{"enable_blob_files", "true"}, |
|
|
|
|
{"min_blob_size", "1K"}, |
|
|
|
|
{"blob_file_size", "1G"}, |
|
|
|
|
{"blob_compression_type", "kZSTD"}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
std::unordered_map<std::string, std::string> db_options_map = { |
|
|
|
@ -1616,6 +1628,10 @@ TEST_F(OptionsOldApiTest, GetOptionsFromMapTest) { |
|
|
|
|
ASSERT_EQ(new_cf_opt.optimize_filters_for_hits, true); |
|
|
|
|
ASSERT_EQ(std::string(new_cf_opt.prefix_extractor->Name()), |
|
|
|
|
"rocksdb.FixedPrefix.31"); |
|
|
|
|
ASSERT_EQ(new_cf_opt.enable_blob_files, true); |
|
|
|
|
ASSERT_EQ(new_cf_opt.min_blob_size, 1ULL << 10); |
|
|
|
|
ASSERT_EQ(new_cf_opt.blob_file_size, 1ULL << 30); |
|
|
|
|
ASSERT_EQ(new_cf_opt.blob_compression_type, kZSTD); |
|
|
|
|
|
|
|
|
|
cf_options_map["write_buffer_size"] = "hello"; |
|
|
|
|
ASSERT_NOK(GetColumnFamilyOptionsFromMap( |
|
|
|
|