From 09de6e9b6855ff82c752678721cc43922af670d8 Mon Sep 17 00:00:00 2001 From: Yukang-Lian Date: Thu, 10 Apr 2025 15:39:39 +0800 Subject: [PATCH 1/2] 1 --- be/src/olap/tablet.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index dc8f665ec00d15..5a3dcc4f980c64 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -1770,12 +1770,15 @@ Status Tablet::prepare_compaction_and_calculate_permits( // return OK if OLAP_ERR_CUMULATIVE_NO_SUITABLE_VERSION, so that we don't need to // print too much useless logs. // And because we set permits to 0, so even if we return OK here, nothing will be done. - LOG_INFO( - "cumulative compaction meet delete rowset, increase cumu point without other " - "operation.") - .tag("tablet id:", tablet->tablet_id()) - .tag("after cumulative compaction, cumu point:", - tablet->cumulative_layer_point()); + if (res.msg() == "_last_delete_version.first not equal to -1") { + LOG_INFO( + "cumulative compaction meet delete rowset, increase cumu point without " + "other " + "operation.") + .tag("tablet id:", tablet->tablet_id()) + .tag("after cumulative compaction, cumu point:", + tablet->cumulative_layer_point()); + } return Status::OK(); } } else if (compaction_type == CompactionType::BASE_COMPACTION) { From 03d156cfb2844f139e76a0a4be38ad1fc90fda1f Mon Sep 17 00:00:00 2001 From: Yukang-Lian Date: Thu, 10 Apr 2025 16:39:45 +0800 Subject: [PATCH 2/2] 2 --- be/src/olap/cumulative_compaction.cpp | 7 +++++++ be/src/olap/tablet.cpp | 9 --------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/be/src/olap/cumulative_compaction.cpp b/be/src/olap/cumulative_compaction.cpp index ea6b323354cfca..1df669cfe6fc2b 100644 --- a/be/src/olap/cumulative_compaction.cpp +++ b/be/src/olap/cumulative_compaction.cpp @@ -183,6 +183,13 @@ Status CumulativeCompaction::pick_rowsets_to_compact() { // plus 1 to skip the delete version. // NOTICE: after that, the cumulative point may be larger than max version of this tablet, but it doesn't matter. tablet()->set_cumulative_layer_point(_last_delete_version.first + 1); + LOG_INFO( + "cumulative compaction meet delete rowset, increase cumu point without " + "other " + "operation.") + .tag("tablet id:", tablet()->tablet_id()) + .tag("after cumulative compaction, cumu point:", + tablet()->cumulative_layer_point()); return Status::Error( "_last_delete_version.first not equal to -1"); } diff --git a/be/src/olap/tablet.cpp b/be/src/olap/tablet.cpp index 5a3dcc4f980c64..ce55677ea64a25 100644 --- a/be/src/olap/tablet.cpp +++ b/be/src/olap/tablet.cpp @@ -1770,15 +1770,6 @@ Status Tablet::prepare_compaction_and_calculate_permits( // return OK if OLAP_ERR_CUMULATIVE_NO_SUITABLE_VERSION, so that we don't need to // print too much useless logs. // And because we set permits to 0, so even if we return OK here, nothing will be done. - if (res.msg() == "_last_delete_version.first not equal to -1") { - LOG_INFO( - "cumulative compaction meet delete rowset, increase cumu point without " - "other " - "operation.") - .tag("tablet id:", tablet->tablet_id()) - .tag("after cumulative compaction, cumu point:", - tablet->cumulative_layer_point()); - } return Status::OK(); } } else if (compaction_type == CompactionType::BASE_COMPACTION) {