@ -3803,17 +3803,23 @@ Status VersionSet::ProcessManifestWrites(
assert ( ! mutable_cf_options_ptrs . empty ( ) & &
assert ( ! mutable_cf_options_ptrs . empty ( ) & &
builder_guards . size ( ) = = versions . size ( ) ) ;
builder_guards . size ( ) = = versions . size ( ) ) ;
ColumnFamilyData * cfd = versions [ i ] - > cfd_ ;
ColumnFamilyData * cfd = versions [ i ] - > cfd_ ;
builder_guards [ i ] - > version_builder ( ) - > LoadTableHandlers (
s = builder_guards [ i ] - > version_builder ( ) - > LoadTableHandlers (
cfd - > internal_stats ( ) , cfd - > ioptions ( ) - > optimize_filters_for_hits ,
cfd - > internal_stats ( ) , cfd - > ioptions ( ) - > optimize_filters_for_hits ,
true /* prefetch_index_and_filter_in_cache */ ,
true /* prefetch_index_and_filter_in_cache */ ,
false /* is_initial_load */ ,
false /* is_initial_load */ ,
mutable_cf_options_ptrs [ i ] - > prefix_extractor . get ( ) ) ;
mutable_cf_options_ptrs [ i ] - > prefix_extractor . get ( ) ) ;
if ( ! s . ok ( ) ) {
if ( db_options_ - > paranoid_checks ) {
break ;
}
s = Status : : OK ( ) ;
}
}
}
}
}
if ( s . ok ( ) & & new_descriptor_log ) {
// This is fine because everything inside of this block is serialized --
// This is fine because everything inside of this block is serialized --
// only one thread can be here at the same time
// only one thread can be here at the same time
if ( new_descriptor_log ) {
// create new manifest file
// create new manifest file
ROCKS_LOG_INFO ( db_options_ - > info_log , " Creating manifest % " PRIu64 " \n " ,
ROCKS_LOG_INFO ( db_options_ - > info_log , " Creating manifest % " PRIu64 " \n " ,
pending_manifest_file_number_ ) ;
pending_manifest_file_number_ ) ;
@ -3835,6 +3841,7 @@ Status VersionSet::ProcessManifestWrites(
}
}
}
}
if ( s . ok ( ) ) {
if ( ! first_writer . edit_list . front ( ) - > IsColumnFamilyManipulation ( ) ) {
if ( ! first_writer . edit_list . front ( ) - > IsColumnFamilyManipulation ( ) ) {
for ( int i = 0 ; i < static_cast < int > ( versions . size ( ) ) ; + + i ) {
for ( int i = 0 ; i < static_cast < int > ( versions . size ( ) ) ; + + i ) {
versions [ i ] - > PrepareApply ( * mutable_cf_options_ptrs [ i ] , true ) ;
versions [ i ] - > PrepareApply ( * mutable_cf_options_ptrs [ i ] , true ) ;
@ -3842,7 +3849,6 @@ Status VersionSet::ProcessManifestWrites(
}
}
// Write new records to MANIFEST log
// Write new records to MANIFEST log
if ( s . ok ( ) ) {
# ifndef NDEBUG
# ifndef NDEBUG
size_t idx = 0 ;
size_t idx = 0 ;
# endif
# endif
@ -4386,8 +4392,8 @@ Status VersionSet::Recover(
const std : : vector < ColumnFamilyDescriptor > & column_families , bool read_only ,
const std : : vector < ColumnFamilyDescriptor > & column_families , bool read_only ,
std : : string * db_id ) {
std : : string * db_id ) {
std : : unordered_map < std : : string , ColumnFamilyOptions > cf_name_to_options ;
std : : unordered_map < std : : string , ColumnFamilyOptions > cf_name_to_options ;
for ( auto cf : column_families ) {
for ( const auto & cf : column_families ) {
cf_name_to_options . insert ( { cf . name , cf . options } ) ;
cf_name_to_options . emplace ( cf . name , cf . options ) ;
}
}
// keeps track of column families in manifest that were not found in
// keeps track of column families in manifest that were not found in
// column families parameters. if those column families are not dropped
// column families parameters. if those column families are not dropped
@ -4518,11 +4524,17 @@ Status VersionSet::Recover(
// unlimited table cache. Pre-load table handle now.
// unlimited table cache. Pre-load table handle now.
// Need to do it out of the mutex.
// Need to do it out of the mutex.
builder - > LoadTableHandlers (
s = builder - > LoadTableHandlers (
cfd - > internal_stats ( ) , db_options_ - > max_file_opening_threads ,
cfd - > internal_stats ( ) , db_options_ - > max_file_opening_threads ,
false /* prefetch_index_and_filter_in_cache */ ,
false /* prefetch_index_and_filter_in_cache */ ,
true /* is_initial_load */ ,
true /* is_initial_load */ ,
cfd - > GetLatestMutableCFOptions ( ) - > prefix_extractor . get ( ) ) ;
cfd - > GetLatestMutableCFOptions ( ) - > prefix_extractor . get ( ) ) ;
if ( ! s . ok ( ) ) {
if ( db_options_ - > paranoid_checks ) {
return s ;
}
s = Status : : OK ( ) ;
}
Version * v = new Version ( cfd , this , file_options_ ,
Version * v = new Version ( cfd , this , file_options_ ,
* cfd - > GetLatestMutableCFOptions ( ) ,
* cfd - > GetLatestMutableCFOptions ( ) ,