From 65190ac48b614b4bd2f3d5d173cf8fdbb2c0fc1a Mon Sep 17 00:00:00 2001 From: Chris Mumford Date: Wed, 17 Jun 2015 10:34:42 -0700 Subject: [PATCH] Will not reuse manifest if reuse_logs options is false. Prior implementation would always try to reuse the manifest, even if reuse_logs was false (the default). This was missed because the stock Env::NewAppendableFile implementation returns false forcing the creation of a new log. --- db/version_set.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/db/version_set.cc b/db/version_set.cc index a07e7ec..a5e0f77 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1017,6 +1017,9 @@ Status VersionSet::Recover(bool *save_manifest) { bool VersionSet::ReuseManifest(const std::string& dscname, const std::string& dscbase) { + if (!options_->reuse_logs) { + return false; + } FileType manifest_type; uint64_t manifest_number; uint64_t manifest_size;