Fix reduce_levels_test
This commit is contained in:
parent
fe9bd300d6
commit
5661ed8b80
@ -1929,7 +1929,8 @@ Status VersionSet::ReduceNumberOfLevels(const std::string& dbname,
|
|||||||
Status status;
|
Status status;
|
||||||
|
|
||||||
std::vector<ColumnFamilyDescriptor> dummy;
|
std::vector<ColumnFamilyDescriptor> dummy;
|
||||||
dummy.push_back(ColumnFamilyDescriptor());
|
ColumnFamilyDescriptor dummy_descriptor(default_column_family_name, ColumnFamilyOptions(*options));
|
||||||
|
dummy.push_back(dummy_descriptor);
|
||||||
status = versions.Recover(dummy);
|
status = versions.Recover(dummy);
|
||||||
if (!status.ok()) {
|
if (!status.ok()) {
|
||||||
return status;
|
return status;
|
||||||
|
@ -1017,7 +1017,9 @@ Status ReduceDBLevelsCommand::GetOldNumOfLevels(Options& opt,
|
|||||||
const InternalKeyComparator cmp(opt.comparator);
|
const InternalKeyComparator cmp(opt.comparator);
|
||||||
VersionSet versions(db_path_, &opt, soptions, &tc, &cmp);
|
VersionSet versions(db_path_, &opt, soptions, &tc, &cmp);
|
||||||
std::vector<ColumnFamilyDescriptor> dummy;
|
std::vector<ColumnFamilyDescriptor> dummy;
|
||||||
dummy.push_back(ColumnFamilyDescriptor());
|
ColumnFamilyDescriptor dummy_descriptor(default_column_family_name,
|
||||||
|
ColumnFamilyOptions(opt));
|
||||||
|
dummy.push_back(dummy_descriptor);
|
||||||
// We rely the VersionSet::Recover to tell us the internal data structures
|
// We rely the VersionSet::Recover to tell us the internal data structures
|
||||||
// in the db. And the Recover() should never do any change
|
// in the db. And the Recover() should never do any change
|
||||||
// (like LogAndApply) to the manifest file.
|
// (like LogAndApply) to the manifest file.
|
||||||
|
Loading…
Reference in New Issue
Block a user