diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp index 6a8c88d99df9b0..2420154e013d10 100644 --- a/be/src/olap/compaction.cpp +++ b/be/src/olap/compaction.cpp @@ -1072,6 +1072,18 @@ Status CloudCompactionMixin::execute_compact_impl(int64_t permits) { RETURN_IF_ERROR(merge_input_rowsets()); + DBUG_EXECUTE_IF("CloudFullCompaction::modify_rowsets.wrong_rowset_id", { + DCHECK(compaction_type() == ReaderType::READER_FULL_COMPACTION); + RowsetId id; + id.version = 2; + id.hi = _output_rowset->rowset_meta()->rowset_id().hi + ((int64_t)(1) << 56); + id.mi = _output_rowset->rowset_meta()->rowset_id().mi; + id.lo = _output_rowset->rowset_meta()->rowset_id().lo; + _output_rowset->rowset_meta()->set_rowset_id(id); + LOG(INFO) << "[Debug wrong rowset id]:" + << _output_rowset->rowset_meta()->rowset_id().to_string(); + }) + RETURN_IF_ERROR(_engine.meta_mgr().commit_rowset(*_output_rowset->rowset_meta().get())); // 4. modify rowsets in memory diff --git a/cloud/src/common/bvars.cpp b/cloud/src/common/bvars.cpp index f9b11aa85b4897..2e2e312d0c1413 100644 --- a/cloud/src/common/bvars.cpp +++ b/cloud/src/common/bvars.cpp @@ -193,3 +193,6 @@ BvarStatusWithTag g_bvar_checker_check_cost_s("checker", "check_cost_secon BvarStatusWithTag g_bvar_checker_enqueue_cost_s("checker", "enqueue_cost_seconds"); BvarStatusWithTag g_bvar_checker_last_success_time_ms("checker", "last_success_time_ms"); BvarStatusWithTag g_bvar_checker_instance_volume("checker", "instance_volume"); +BvarStatusWithTag g_bvar_inverted_checker_num_scanned("checker", "num_inverted_scanned"); +BvarStatusWithTag g_bvar_inverted_checker_num_check_failed("checker", + "num_inverted_check_failed"); diff --git a/cloud/src/common/bvars.h b/cloud/src/common/bvars.h index 4848ec4b456cef..c2e21c66daad0d 100644 --- a/cloud/src/common/bvars.h +++ b/cloud/src/common/bvars.h @@ -247,3 +247,5 @@ extern BvarStatusWithTag g_bvar_checker_check_cost_s; extern BvarStatusWithTag g_bvar_checker_enqueue_cost_s; extern BvarStatusWithTag g_bvar_checker_last_success_time_ms; extern BvarStatusWithTag g_bvar_checker_instance_volume; +extern BvarStatusWithTag g_bvar_inverted_checker_num_scanned; +extern BvarStatusWithTag g_bvar_inverted_checker_num_check_failed; diff --git a/cloud/src/recycler/checker.cpp b/cloud/src/recycler/checker.cpp index 0ed3b1934c4442..e2ae2e4646d6e6 100644 --- a/cloud/src/recycler/checker.cpp +++ b/cloud/src/recycler/checker.cpp @@ -623,6 +623,8 @@ int InstanceChecker::do_inverted_check() { using namespace std::chrono; auto start_time = steady_clock::now(); std::unique_ptr> defer_log_statistics((int*)0x01, [&](int*) { + g_bvar_inverted_checker_num_scanned.put(instance_id_, num_scanned); + g_bvar_inverted_checker_num_check_failed.put(instance_id_, num_check_failed); auto cost = duration(steady_clock::now() - start_time).count(); LOG(INFO) << "inverted check instance objects finished, cost=" << cost << "s. instance_id=" << instance_id_ << " num_scanned=" << num_scanned