This is an automated email from the ASF dual-hosted git repository.
gavinchou pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 2658ac80f44 [cherry-pick](branch-3.0) Pick "[Enhancement](checker)
Enhance inverted checker (#43294)" (#43869)
2658ac80f44 is described below
commit 2658ac80f449016fa78526f3678002609e6c7794
Author: abmdocrt <[email protected]>
AuthorDate: Wed Nov 13 23:33:51 2024 +0800
[cherry-pick](branch-3.0) Pick "[Enhancement](checker) Enhance inverted
checker (#43294)" (#43869)
---
be/src/olap/compaction.cpp | 12 ++++++++++++
cloud/src/common/bvars.cpp | 3 +++
cloud/src/common/bvars.h | 2 ++
cloud/src/recycler/checker.cpp | 2 ++
4 files changed, 19 insertions(+)
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index 6a8c88d99df..2420154e013 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 f9b11aa85b4..2e2e312d0c1 100644
--- a/cloud/src/common/bvars.cpp
+++ b/cloud/src/common/bvars.cpp
@@ -193,3 +193,6 @@ BvarStatusWithTag<long>
g_bvar_checker_check_cost_s("checker", "check_cost_secon
BvarStatusWithTag<long> g_bvar_checker_enqueue_cost_s("checker",
"enqueue_cost_seconds");
BvarStatusWithTag<long> g_bvar_checker_last_success_time_ms("checker",
"last_success_time_ms");
BvarStatusWithTag<long> g_bvar_checker_instance_volume("checker",
"instance_volume");
+BvarStatusWithTag<long> g_bvar_inverted_checker_num_scanned("checker",
"num_inverted_scanned");
+BvarStatusWithTag<long> 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 4848ec4b456..c2e21c66daa 100644
--- a/cloud/src/common/bvars.h
+++ b/cloud/src/common/bvars.h
@@ -247,3 +247,5 @@ extern BvarStatusWithTag<long> g_bvar_checker_check_cost_s;
extern BvarStatusWithTag<long> g_bvar_checker_enqueue_cost_s;
extern BvarStatusWithTag<long> g_bvar_checker_last_success_time_ms;
extern BvarStatusWithTag<long> g_bvar_checker_instance_volume;
+extern BvarStatusWithTag<long> g_bvar_inverted_checker_num_scanned;
+extern BvarStatusWithTag<long> g_bvar_inverted_checker_num_check_failed;
diff --git a/cloud/src/recycler/checker.cpp b/cloud/src/recycler/checker.cpp
index 0ed3b1934c4..fe0887867b0 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<int, std::function<void(int*)>>
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_file_leak);
auto cost = duration<float>(steady_clock::now() - start_time).count();
LOG(INFO) << "inverted check instance objects finished, cost=" << cost
<< "s. instance_id=" << instance_id_ << " num_scanned=" <<
num_scanned
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]