From 6f373badd8728c6da0febef0bdbb05f7424ce4b0 Mon Sep 17 00:00:00 2001 From: abmdocrt Date: Fri, 6 Jun 2025 14:54:05 +0800 Subject: [PATCH] [Fix](Compaction) Fix delete rowset sleeping when compaction (#51482) --- be/src/cloud/cloud_cumulative_compaction.cpp | 1 - be/src/olap/cumulative_compaction.cpp | 1 - be/src/olap/tablet.cpp | 3 ++- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/be/src/cloud/cloud_cumulative_compaction.cpp b/be/src/cloud/cloud_cumulative_compaction.cpp index 9fb70cb4efe7fc..ae66ddb9433329 100644 --- a/be/src/cloud/cloud_cumulative_compaction.cpp +++ b/be/src/cloud/cloud_cumulative_compaction.cpp @@ -51,7 +51,6 @@ Status CloudCumulativeCompaction::prepare_compact() { Defer defer_set_st([&] { if (!st.ok()) { cloud_tablet()->set_last_cumu_compaction_status(st.to_string()); - cloud_tablet()->set_last_cumu_compaction_failure_time(UnixMillis()); } }); if (_tablet->tablet_state() != TABLET_RUNNING && diff --git a/be/src/olap/cumulative_compaction.cpp b/be/src/olap/cumulative_compaction.cpp index e76c3a78426f30..586efb9344fb5c 100644 --- a/be/src/olap/cumulative_compaction.cpp +++ b/be/src/olap/cumulative_compaction.cpp @@ -83,7 +83,6 @@ Status CumulativeCompaction::prepare_compact() { Defer defer_set_st([&] { if (!st.ok()) { tablet()->set_last_cumu_compaction_status(st.to_string()); - tablet()->set_last_cumu_compaction_failure_time(UnixMillis()); } }); diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index a0178a6bad5c41..9ff7ec74edaf31 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -1737,7 +1737,8 @@ Status Tablet::prepare_compaction_and_calculate_permits( config::enable_sleep_between_delete_cumu_compaction) { tablet->set_last_cumu_compaction_failure_time(UnixMillis()); } - if (!res.is()) { + if (!res.is() && + !res.is()) { DorisMetrics::instance()->cumulative_compaction_request_failed->increment(1); return Status::InternalError("prepare cumulative compaction with err: {}", res.to_string());