From bcea9c129645d90a97c6454bcddd4523bf9d8751 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Tue, 18 Mar 2014 09:45:52 -0700 Subject: [PATCH] Finalize version in dumpmanifest --- db/version_set.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/db/version_set.cc b/db/version_set.cc index 441a5555c..8da24f36f 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -2014,6 +2014,7 @@ Status VersionSet::Recover( std::vector size_being_compacted(v->NumberLevels() - 1); cfd->compaction_picker()->SizeBeingCompacted(size_being_compacted); v->Finalize(size_being_compacted); + v->UpdateFilesBySize(); AppendVersion(cfd, v); } @@ -2343,6 +2344,10 @@ Status VersionSet::DumpManifest(Options& options, std::string& dscname, Version* v = new Version(cfd, this, current_version_number_++); builder->SaveTo(v); + std::vector size_being_compacted(v->NumberLevels() - 1); + cfd->compaction_picker()->SizeBeingCompacted(size_being_compacted); + v->Finalize(size_being_compacted); + v->UpdateFilesBySize(); delete builder; printf("--------------- Column family \"%s\" (ID %u) --------------\n",