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

jianliangqi 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 70ecb738061 branch-3.0: [test](regression)Add index compaction 
exception case #46118 (#46207)
70ecb738061 is described below

commit 70ecb73806172e6ffd5b96d018cb1ad2c121f8e6
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jan 15 11:00:55 2025 +0800

    branch-3.0: [test](regression)Add index compaction exception case #46118 
(#46207)
    
    Cherry-picked from #46118
    
    Co-authored-by: qiye <l...@selectdb.com>
---
 be/src/olap/compaction.cpp                                     |  2 ++
 .../test_index_compaction_fault_injection.groovy               | 10 ++++++++++
 2 files changed, 12 insertions(+)

diff --git a/be/src/olap/compaction.cpp b/be/src/olap/compaction.cpp
index c507cc17a27..9233f142d8e 100644
--- a/be/src/olap/compaction.cpp
+++ b/be/src/olap/compaction.cpp
@@ -801,6 +801,8 @@ void Compaction::mark_skip_index_compaction(
     for (auto&& column_uniq_id : context.columns_to_do_index_compaction) {
         auto col = _cur_tablet_schema->column_by_uid(column_uniq_id);
         const auto* index_meta = _cur_tablet_schema->inverted_index(col);
+        
DBUG_EXECUTE_IF("Compaction::mark_skip_index_compaction_can_not_find_index_meta",
+                        { index_meta = nullptr; })
         if (index_meta == nullptr) {
             LOG(WARNING) << "mark skip index compaction, can not find 
index_meta for column"
                          << ". tablet=" << _tablet->tablet_id()
diff --git 
a/regression-test/suites/fault_injection_p0/test_index_compaction_fault_injection.groovy
 
b/regression-test/suites/fault_injection_p0/test_index_compaction_fault_injection.groovy
index 6c9cac37f0b..7820c001ce4 100644
--- 
a/regression-test/suites/fault_injection_p0/test_index_compaction_fault_injection.groovy
+++ 
b/regression-test/suites/fault_injection_p0/test_index_compaction_fault_injection.groovy
@@ -142,11 +142,13 @@ suite("test_index_compaction_failure_injection", 
"nonConcurrent") {
         // tigger full compaction for all tablets with fault injection
         try {
             
GetDebugPoint().enableDebugPointForAllBEs("index_compaction_compact_column_throw_error")
+            
GetDebugPoint().enableDebugPointForAllBEs("Compaction::mark_skip_index_compaction_can_not_find_index_meta")
             logger.info("trigger_full_compaction_on_tablets with fault 
injection: index_compaction_compact_column_throw_error")
             trigger_full_compaction_on_tablets.call(tablets)
             wait_full_compaction_done.call(tablets)
         } finally {
             
GetDebugPoint().disableDebugPointForAllBEs("index_compaction_compact_column_throw_error")
+            
GetDebugPoint().disableDebugPointForAllBEs("Compaction::mark_skip_index_compaction_can_not_find_index_meta")
         }
         // after fault injection, there are still 7 rowsets.
         rowsetCount = get_rowset_count.call(tablets);
@@ -257,6 +259,7 @@ suite("test_index_compaction_failure_injection", 
"nonConcurrent") {
     }
 
     boolean invertedIndexCompactionEnable = false
+    boolean debug_inverted_index_compaction = false
     boolean has_update_be_config = false
     try {
         String backend_id;
@@ -278,11 +281,17 @@ suite("test_index_compaction_failure_injection", 
"nonConcurrent") {
                 disableAutoCompaction = Boolean.parseBoolean(((List<String>) 
ele)[2])
                 logger.info("disable_auto_compaction: ${((List<String>) 
ele)[2]}")
             }
+            if (((List<String>) ele)[0] == "debug_inverted_index_compaction") {
+                debug_inverted_index_compaction = 
Boolean.parseBoolean(((List<String>) ele)[2])
+                logger.info("debug_inverted_index_compaction: 
${((List<String>) ele)[2]}")
+            }
         }
         set_be_config.call("inverted_index_compaction_enable", "true")
+        set_be_config.call("debug_inverted_index_compaction", "true")
         has_update_be_config = true
         // check updated config
         check_config.call("inverted_index_compaction_enable", "true");
+        check_config.call("debug_inverted_index_compaction", "true")
 
 
         /**
@@ -343,6 +352,7 @@ suite("test_index_compaction_failure_injection", 
"nonConcurrent") {
     } finally {
         if (has_update_be_config) {
             set_be_config.call("inverted_index_compaction_enable", 
invertedIndexCompactionEnable.toString())
+            set_be_config.call("debug_inverted_index_compaction", 
debug_inverted_index_compaction.toString())
         }
     }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to