mirror of
https://github.com/facebook/rocksdb.git
synced 2024-11-26 07:30:54 +00:00
Fixed a crash bug that incorrectly parse deprecated options in options_helper
Summary: Fixed a crash bug that incorrectly parse deprecated options in options_helper Test Plan: run db_bench with an old options file with memtable_prefix_bloom_probes ./db_bench --options_file=AN_OLD_OPTIONS_FILE --num=100 --benchmarks=fillseq Reviewers: sdong, IslamAbdelRahman Subscribers: andrewkr, dhruba, leveldb Differential Revision: https://reviews.facebook.net/D59787
This commit is contained in:
parent
cf8adc971e
commit
3a2bccc845
|
@ -845,7 +845,8 @@ Status ParseColumnFamilyOption(const std::string& name,
|
|||
"Unable to parse the specified CF option " + name);
|
||||
}
|
||||
const auto& opt_info = iter->second;
|
||||
if (ParseOptionHelper(
|
||||
if (opt_info.verification != OptionVerificationType::kDeprecated &&
|
||||
ParseOptionHelper(
|
||||
reinterpret_cast<char*>(new_options) + opt_info.offset,
|
||||
opt_info.type, value)) {
|
||||
return Status::OK();
|
||||
|
@ -1037,7 +1038,8 @@ Status ParseDBOption(const std::string& name,
|
|||
return Status::InvalidArgument("Unrecognized option DBOptions:", name);
|
||||
}
|
||||
const auto& opt_info = iter->second;
|
||||
if (ParseOptionHelper(
|
||||
if (opt_info.verification != OptionVerificationType::kDeprecated &&
|
||||
ParseOptionHelper(
|
||||
reinterpret_cast<char*>(new_options) + opt_info.offset,
|
||||
opt_info.type, value)) {
|
||||
return Status::OK();
|
||||
|
|
Loading…
Reference in a new issue