@@ -1822,7 +1822,7 @@ Status VersionSet::Recover(
1822
1822
// keeps track of column families in manifest that were not found in
1823
1823
// column families parameters. if those column families are not dropped
1824
1824
// by subsequent manifest records, Recover() will return failure status
1825
- std::set <int > column_families_not_found;
1825
+ std::unordered_map <int , std::string > column_families_not_found;
1826
1826
1827
1827
// Read "CURRENT" file, which contains a pointer to the current manifest file
1828
1828
std::string manifest_filename;
@@ -1924,7 +1924,8 @@ Status VersionSet::Recover(
1924
1924
}
1925
1925
auto cf_options = cf_name_to_options.find (edit.column_family_name_ );
1926
1926
if (cf_options == cf_name_to_options.end ()) {
1927
- column_families_not_found.insert (edit.column_family_ );
1927
+ column_families_not_found.insert (
1928
+ {edit.column_family_ , edit.column_family_name_ });
1928
1929
} else {
1929
1930
cfd = CreateColumnFamily (cf_options->second , &edit);
1930
1931
builders.insert ({edit.column_family_ , new Builder (cfd)});
@@ -2038,13 +2039,13 @@ Status VersionSet::Recover(
2038
2039
// in the argument. This is OK in read_only mode
2039
2040
if (read_only == false && column_families_not_found.size () > 0 ) {
2040
2041
std::string list_of_not_found;
2041
- for (auto cf : column_families_not_found) {
2042
- list_of_not_found += " , " + cf;
2042
+ for (const auto & cf : column_families_not_found) {
2043
+ list_of_not_found += " , " + cf. second ;
2043
2044
}
2044
2045
list_of_not_found = list_of_not_found.substr (2 );
2045
2046
s = Status::InvalidArgument (
2046
- " You have to open all column families. Column families not opened: %s " ,
2047
- list_of_not_found. c_str () );
2047
+ " You have to open all column families. Column families not opened: " +
2048
+ list_of_not_found);
2048
2049
}
2049
2050
2050
2051
if (s.ok ()) {
0 commit comments