From 5661ed8b8083b9d31a9e512a5cd6c2a32e395428 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Fri, 31 Jan 2014 19:44:48 -0800 Subject: [PATCH] Fix reduce_levels_test --- db/version_set.cc | 3 ++- util/ldb_cmd.cc | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/db/version_set.cc b/db/version_set.cc index f78c1deb5..7fc1880ea 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1929,7 +1929,8 @@ Status VersionSet::ReduceNumberOfLevels(const std::string& dbname, Status status; std::vector dummy; - dummy.push_back(ColumnFamilyDescriptor()); + ColumnFamilyDescriptor dummy_descriptor(default_column_family_name, ColumnFamilyOptions(*options)); + dummy.push_back(dummy_descriptor); status = versions.Recover(dummy); if (!status.ok()) { return status; diff --git a/util/ldb_cmd.cc b/util/ldb_cmd.cc index 157126de6..149b02c0d 100644 --- a/util/ldb_cmd.cc +++ b/util/ldb_cmd.cc @@ -1017,7 +1017,9 @@ Status ReduceDBLevelsCommand::GetOldNumOfLevels(Options& opt, const InternalKeyComparator cmp(opt.comparator); VersionSet versions(db_path_, &opt, soptions, &tc, &cmp); std::vector 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 // in the db. And the Recover() should never do any change // (like LogAndApply) to the manifest file.