From 120ea4d0e388a501773d9ded3a9e97a50f7ebf30 Mon Sep 17 00:00:00 2001 From: groot Date: Tue, 10 Mar 2020 19:56:06 +0800 Subject: [PATCH] #1609 Refine Compact function Signed-off-by: groot --- core/src/db/DBImpl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/db/DBImpl.cpp b/core/src/db/DBImpl.cpp index 9d10dd5a2a..37a2b5f3e5 100644 --- a/core/src/db/DBImpl.cpp +++ b/core/src/db/DBImpl.cpp @@ -723,12 +723,11 @@ DBImpl::Compact(const std::string& table_id) { ENGINE_LOG_DEBUG << "Updating meta after compaction..."; status = meta_ptr_->UpdateTableFiles(files_to_update); + OngoingFileChecker::GetInstance().UnmarkOngoingFile(file); if (!status.ok()) { compact_status = status; break; // meta error, could not go on } - - OngoingFileChecker::GetInstance().UnmarkOngoingFile(file); } OngoingFileChecker::GetInstance().UnmarkOngoingFiles(files_to_compact);