diff options
author | Chris Mumford <cmumford@chromium.org> | 2015-06-17 10:34:42 -0700 |
---|---|---|
committer | Chris Mumford <cmumford@chromium.org> | 2015-08-11 14:59:48 -0700 |
commit | 65190ac48b614b4bd2f3d5d173cf8fdbb2c0fc1a (patch) | |
tree | ab798f94876823bc359fd909ac60f85b0592d450 | |
parent | ac1d69da31205a979b5a8510f33c31ae977530f0 (diff) | |
download | leveldb-65190ac48b614b4bd2f3d5d173cf8fdbb2c0fc1a.tar.gz |
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.
-rw-r--r-- | db/version_set.cc | 3 |
1 files changed, 3 insertions, 0 deletions
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; |