From 69aa6ecb269f1fc7dfa3d97e3cf5e9fb4f8556de Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 18 Mar 2014 14:23:47 -0700 Subject: [PATCH] Finalize fist version in column family --- db/version_set.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/db/version_set.cc b/db/version_set.cc index a47d4e93f..03604f4ba 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2708,7 +2708,11 @@ ColumnFamilyData* VersionSet::CreateColumnFamily( auto new_cfd = column_family_set_->CreateColumnFamily( edit->column_family_name_, edit->column_family_, dummy_versions, options); - AppendVersion(new_cfd, new Version(new_cfd, this, current_version_number_++)); + Version* v = new Version(new_cfd, this, current_version_number_++); + std::vector size_being_compacted(options.num_levels - 1, 0); + v->Finalize(size_being_compacted); + + AppendVersion(new_cfd, v); new_cfd->CreateNewMemtable(); new_cfd->SetLogNumber(edit->log_number_); return new_cfd;