This is an automated email from the ASF dual-hosted git repository.

zhangchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 576d607f684 [enhancement](merge-on-write) add debuging config to make 
BE core directly when correctness issue happens (#36308)
576d607f684 is described below

commit 576d607f6846aecfaa804355d0147bfe593c97c8
Author: zhannngchen <[email protected]>
AuthorDate: Fri Jun 14 21:44:14 2024 +0800

    [enhancement](merge-on-write) add debuging config to make BE core directly 
when correctness issue happens (#36308)
    
    Some times it's necessary to core directly to keep the raw data layout not 
change, when debugging duplicate key issues on mow table.
---
 be/src/cloud/cloud_tablet.cpp |  6 +++++-
 be/src/common/config.cpp      |  3 +++
 be/src/common/config.h        |  3 +++
 be/src/olap/compaction.cpp    | 12 ++++++++++--
 4 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/be/src/cloud/cloud_tablet.cpp b/be/src/cloud/cloud_tablet.cpp
index c09d57e500e..5f77c7f44c1 100644
--- a/be/src/cloud/cloud_tablet.cpp
+++ b/be/src/cloud/cloud_tablet.cpp
@@ -686,7 +686,11 @@ Status CloudTablet::calc_delete_bitmap_for_compaction(
                         "cumulative compaction: the merged rows({}) is not 
equal to missed "
                         "rows({}) in rowid conversion, tablet_id: {}, 
table_id:{}",
                         merged_rows, missed_rows_size, tablet_id(), 
table_id());
-                DCHECK(false) << err_msg;
+                if (config::enable_mow_compaction_correctness_check_core) {
+                    CHECK(false) << err_msg;
+                } else {
+                    DCHECK(false) << err_msg;
+                }
                 LOG(WARNING) << err_msg;
             }
         }
diff --git a/be/src/common/config.cpp b/be/src/common/config.cpp
index 984a4ce62d0..2b8cfd8f9bb 100644
--- a/be/src/common/config.cpp
+++ b/be/src/common/config.cpp
@@ -1110,6 +1110,9 @@ DEFINE_mInt64(lookup_connection_cache_capacity, "2048");
 DEFINE_mInt64(LZ4_HC_compression_level, "9");
 
 DEFINE_mBool(enable_merge_on_write_correctness_check, "true");
+// USED FOR DEBUGING
+// core directly if the compaction found there's duplicate key on mow table
+DEFINE_mBool(enable_mow_compaction_correctness_check_core, "false");
 // rowid conversion correctness check when compaction for mow table
 DEFINE_mBool(enable_rowid_conversion_correctness_check, "false");
 // When the number of missing versions is more than this value, do not directly
diff --git a/be/src/common/config.h b/be/src/common/config.h
index d3bed036be6..431ad3e7b66 100644
--- a/be/src/common/config.h
+++ b/be/src/common/config.h
@@ -1177,6 +1177,9 @@ 
DECLARE_mDouble(variant_ratio_of_defaults_as_sparse_column);
 DECLARE_mInt64(variant_threshold_rows_to_estimate_sparse_column);
 
 DECLARE_mBool(enable_merge_on_write_correctness_check);
+// USED FOR DEBUGING
+// core directly if the compaction found there's duplicate key on mow table
+DECLARE_mBool(enable_mow_compaction_correctness_check_core);
 // rowid conversion correctness check when compaction for mow table
 DECLARE_mBool(enable_rowid_conversion_correctness_check);
 // When the number of missing versions is more than this value, do not directly
diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index 47be4e01e07..441a3fd140a 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -493,7 +493,11 @@ Status Compaction::do_inverted_index_compaction() {
                     "rows({}) in rowid conversion, tablet_id: {}, table_id:{}",
                     _stats.merged_rows, missed_rows.size(), 
_tablet->tablet_id(),
                     _tablet->table_id());
-            DCHECK(false) << err_msg;
+            if (config::enable_mow_compaction_correctness_check_core) {
+                CHECK(false) << err_msg;
+            } else {
+                DCHECK(false) << err_msg;
+            }
             LOG(WARNING) << err_msg;
             return Status::InternalError(err_msg);
         }
@@ -924,7 +928,11 @@ Status CompactionMixin::modify_rowsets() {
                         "rows({}) in rowid conversion, tablet_id: {}, 
table_id:{}",
                         _stats.merged_rows, missed_rows_size, 
_tablet->tablet_id(),
                         _tablet->table_id());
-                DCHECK(false) << err_msg;
+                if (config::enable_mow_compaction_correctness_check_core) {
+                    CHECK(false) << err_msg;
+                } else {
+                    DCHECK(false) << err_msg;
+                }
                 LOG(WARNING) << err_msg;
             }
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to