From fd367e677e4af0f01f18b93aed7e4cf8e527768f Mon Sep 17 00:00:00 2001 From: Dhruba Borthakur Date: Mon, 18 Feb 2013 20:08:12 -0800 Subject: [PATCH] Fix unit test failure in db_filename.cc Summary: c_test: db/filename.cc:74: std::string leveldb::DescriptorFileName(const string&,.... Test Plan: this is a failure in a unit test Differential Revision: https://reviews.facebook.net/D8667 --- db/version_set.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/version_set.cc b/db/version_set.cc index 65ae1becb7..ca1e96dbd6 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -985,7 +985,8 @@ Status VersionSet::LogAndApply(VersionEdit* edit, port::Mutex* mu, Status s; // No need to perform this check if a new Manifest is being created anyways. - if (last_observed_manifest_size_ > options_->max_manifest_file_size) { + if (!descriptor_log_ || + last_observed_manifest_size_ > options_->max_manifest_file_size) { new_descriptor_log = true; manifest_file_number_ = NewFileNumber(); // Change manifest file no. }