From b905041b5a26a6033fc0c562c73ddc4db5e2266b Mon Sep 17 00:00:00 2001 From: "wangyi.ywq" Date: Thu, 30 Jun 2022 14:37:19 +0800 Subject: [PATCH] fix ut & not copy wal file --- db/db_filesnapshot.cc | 2 ++ utilities/checkpoint/checkpoint_impl.cc | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/db/db_filesnapshot.cc b/db/db_filesnapshot.cc index 36a01c2a41..a57f34d732 100644 --- a/db/db_filesnapshot.cc +++ b/db/db_filesnapshot.cc @@ -157,6 +157,8 @@ Status DBImpl::FakeFlush(std::vector& ret) { cfd->Unref(); } mutex_.Unlock(); + TEST_SYNC_POINT("DBImpl::GetLiveFiles:1"); + TEST_SYNC_POINT("DBImpl::GetLiveFiles:2"); if (status.ok()) { for (auto iter : version_edits_) { diff --git a/utilities/checkpoint/checkpoint_impl.cc b/utilities/checkpoint/checkpoint_impl.cc index 543a51abc3..f385df8870 100644 --- a/utilities/checkpoint/checkpoint_impl.cc +++ b/utilities/checkpoint/checkpoint_impl.cc @@ -246,7 +246,7 @@ Status CheckpointImpl::CreateCustomCheckpoint( db_->FlushWAL(false /* sync */); } // if we have more than one column family, we need to also get WAL files - if (s.ok()) { + if (s.ok() && !db_options.check_point_fake_flush ) { s = db_->GetSortedWalFiles(live_wal_files); } if (!s.ok()) {