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
This commit is contained in:
Yueh-Hsuan Chiang 2015-09-29 17:58:00 -07:00
parent 5a51fa907b
commit da1cf8a9bc

View File

@ -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;