@ -43,6 +43,7 @@ Status Configurable::PrepareOptions(const ConfigOptions& opts) {
Status status = Status : : OK ( ) ;
# ifndef ROCKSDB_LITE
for ( auto opt_iter : options_ ) {
if ( opt_iter . type_map ! = nullptr ) {
for ( auto map_iter : * ( opt_iter . type_map ) ) {
auto & opt_info = map_iter . second ;
if ( ! opt_info . IsDeprecated ( ) & & ! opt_info . IsAlias ( ) & &
@ -56,8 +57,9 @@ Status Configurable::PrepareOptions(const ConfigOptions& opts) {
return status ;
}
} else if ( ! opt_info . CanBeNull ( ) ) {
status =
Status : : NotFound ( " Missing configurable object " , map_iter . first ) ;
status = Status : : NotFound ( " Missing configurable object " ,
map_iter . first ) ;
}
}
}
}
@ -74,6 +76,7 @@ Status Configurable::ValidateOptions(const DBOptions& db_opts,
Status status ;
# ifndef ROCKSDB_LITE
for ( auto opt_iter : options_ ) {
if ( opt_iter . type_map ! = nullptr ) {
for ( auto map_iter : * ( opt_iter . type_map ) ) {
auto & opt_info = map_iter . second ;
if ( ! opt_info . IsDeprecated ( ) & & ! opt_info . IsAlias ( ) ) {
@ -83,8 +86,8 @@ Status Configurable::ValidateOptions(const DBOptions& db_opts,
if ( config ! = nullptr ) {
status = config - > ValidateOptions ( db_opts , cf_opts ) ;
} else if ( ! opt_info . CanBeNull ( ) ) {
status =
Status : : NotFound ( " Missing configurable object " , map_iter . first ) ;
status = Status : : NotFound ( " Missing configurable object " ,
map_iter . first ) ;
}
if ( ! status . ok ( ) ) {
return status ;
@ -93,6 +96,7 @@ Status Configurable::ValidateOptions(const DBOptions& db_opts,
}
}
}
}
# else
( void ) db_opts ;
( void ) cf_opts ;
@ -124,6 +128,7 @@ const OptionTypeInfo* ConfigurableHelper::FindOption(
const std : : vector < Configurable : : RegisteredOptions > & options ,
const std : : string & short_name , std : : string * opt_name , void * * opt_ptr ) {
for ( auto iter : options ) {
if ( iter . type_map ! = nullptr ) {
const auto opt_info =
OptionTypeInfo : : Find ( short_name , * ( iter . type_map ) , opt_name ) ;
if ( opt_info ! = nullptr ) {
@ -131,6 +136,7 @@ const OptionTypeInfo* ConfigurableHelper::FindOption(
return opt_info ;
}
}
}
return nullptr ;
}
# endif // ROCKSDB_LITE
@ -280,6 +286,7 @@ Status ConfigurableHelper::ConfigureOptions(
if ( ! opts_map . empty ( ) ) {
# ifndef ROCKSDB_LITE
for ( const auto & iter : configurable . options_ ) {
if ( iter . type_map ! = nullptr ) {
s = ConfigureSomeOptions ( config_options , configurable , * ( iter . type_map ) ,
& remaining , iter . opt_ptr ) ;
if ( remaining . empty ( ) ) { // Are there more options left?
@ -288,6 +295,7 @@ Status ConfigurableHelper::ConfigureOptions(
break ;
}
}
}
# else
( void ) configurable ;
if ( ! config_options . ignore_unknown_options ) {
@ -573,6 +581,7 @@ Status ConfigurableHelper::SerializeOptions(const ConfigOptions& config_options,
std : : string * result ) {
assert ( result ) ;
for ( auto const & opt_iter : configurable . options_ ) {
if ( opt_iter . type_map ! = nullptr ) {
for ( const auto & map_iter : * ( opt_iter . type_map ) ) {
const auto & opt_name = map_iter . first ;
const auto & opt_info = map_iter . second ;
@ -607,6 +616,7 @@ Status ConfigurableHelper::SerializeOptions(const ConfigOptions& config_options,
}
}
}
}
return Status : : OK ( ) ;
}
# endif // ROCKSDB_LITE
@ -629,6 +639,7 @@ Status ConfigurableHelper::ListOptions(
const std : : string & prefix , std : : unordered_set < std : : string > * result ) {
Status status ;
for ( auto const & opt_iter : configurable . options_ ) {
if ( opt_iter . type_map ! = nullptr ) {
for ( const auto & map_iter : * ( opt_iter . type_map ) ) {
const auto & opt_name = map_iter . first ;
const auto & opt_info = map_iter . second ;
@ -643,6 +654,7 @@ Status ConfigurableHelper::ListOptions(
}
}
}
}
return status ;
}
# endif // ROCKSDB_LITE
@ -702,7 +714,7 @@ bool ConfigurableHelper::AreEquivalent(const ConfigOptions& config_options,
if ( this_offset ! = that_offset ) {
if ( this_offset = = nullptr | | that_offset = = nullptr ) {
return false ;
} else {
} else if ( o . type_map ! = nullptr ) {
for ( const auto & map_iter : * ( o . type_map ) ) {
const auto & opt_info = map_iter . second ;
if ( config_options . IsCheckEnabled ( opt_info . GetSanityLevel ( ) ) ) {