Add a missing check for deprecated options in options_helper.cc

Summary: Add a missing check for deprecated options in options_helper.cc

Test Plan: options_test

Reviewers: sdong, anthony, IslamAbdelRahman, igor

Reviewed By: igor

Subscribers: dhruba, leveldb

Differential Revision: https://reviews.facebook.net/D47793
main
Yueh-Hsuan Chiang 9 years ago
parent 5a51fa907b
commit da1cf8a9bc
  1. 7
      util/options_helper.cc

@ -665,6 +665,11 @@ Status GetStringFromDBOptions(std::string* opt_string,
opt_string->clear();
for (auto iter = db_options_type_info.begin();
iter != db_options_type_info.end(); ++iter) {
if (iter->second.verification == OptionVerificationType::kDeprecated) {
// If the option is no longer used in rocksdb and marked as deprecated,
// we skip it in the serialization.
continue;
}
std::string single_output;
bool result = SerializeSingleDBOption(&single_output, db_options,
iter->first, delimiter);
@ -703,6 +708,8 @@ Status GetStringFromColumnFamilyOptions(std::string* opt_string,
for (auto iter = cf_options_type_info.begin();
iter != cf_options_type_info.end(); ++iter) {
if (iter->second.verification == OptionVerificationType::kDeprecated) {
// If the option is no longer used in rocksdb and marked as deprecated,
// we skip it in the serialization.
continue;
}
std::string single_output;

Loading…
Cancel
Save