diff --git a/db/db_filesnapshot.cc b/db/db_filesnapshot.cc index 182c4124e8..4807a8d943 100644 --- a/db/db_filesnapshot.cc +++ b/db/db_filesnapshot.cc @@ -163,7 +163,12 @@ Status DBImpl::FakeFlush(std::vector& ret) { VersionEdit* edit = &iter.second; int cf_id = iter.first; for (auto f : edit->GetNewFiles()) { - ret.push_back(MakeTableFileName("", f.second.fd.GetNumber())); + ret.push_back(MakeTableFileName(versions_->GetColumnFamilySet() + ->GetColumnFamily(cf_id) + ->ioptions() + ->cf_paths[0] + .path, + f.second.fd.GetNumber())); } } } diff --git a/utilities/checkpoint/checkpoint_impl.cc b/utilities/checkpoint/checkpoint_impl.cc index a097a0606d..543a51abc3 100644 --- a/utilities/checkpoint/checkpoint_impl.cc +++ b/utilities/checkpoint/checkpoint_impl.cc @@ -170,6 +170,7 @@ Status CheckpointImpl::CreateCustomCheckpoint( uint64_t* sequence_number, uint64_t log_size_for_flush) { Status s; std::vector live_files; + std::vector fake_flush_files; uint64_t manifest_file_size = 0; uint64_t min_log_num = port::kMaxUint64; *sequence_number = db_->GetLatestSequenceNumber(); @@ -205,8 +206,10 @@ Status CheckpointImpl::CreateCustomCheckpoint( // this will return live_files prefixed with "/" if(db_options.check_point_fake_flush){ - s = db_->FakeFlush(live_files); + s = db_->FakeFlush(fake_flush_files); s = db_->GetLiveFiles(live_files, &manifest_file_size, false); + live_files.insert(live_files.end(), fake_flush_files.begin(), + fake_flush_files.end()); }else{ s = db_->GetLiveFiles(live_files, &manifest_file_size, flush_memtable); }