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

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new a336f602f78 branch-4.1: [fix](regression) Make incomplete commit info 
injection deterministic #65633 (#65704)
a336f602f78 is described below

commit a336f602f789f0be774622462be0b5ffc6d54ac0
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Jul 17 14:29:22 2026 +0800

    branch-4.1: [fix](regression) Make incomplete commit info injection 
deterministic #65633 (#65704)
    
    Cherry-picked from #65633
    
    Co-authored-by: shuke <[email protected]>
---
 be/src/exec/sink/writer/vtablet_writer.cpp         | 10 ++++------
 .../test_incomplete_commit_info.groovy             | 22 ++++++++++++++++++++--
 2 files changed, 24 insertions(+), 8 deletions(-)

diff --git a/be/src/exec/sink/writer/vtablet_writer.cpp 
b/be/src/exec/sink/writer/vtablet_writer.cpp
index 2ba4d139016..c5ff0b0d191 100644
--- a/be/src/exec/sink/writer/vtablet_writer.cpp
+++ b/be/src/exec/sink/writer/vtablet_writer.cpp
@@ -1265,14 +1265,12 @@ void VNodeChannel::_add_block_success_callback(const 
PTabletWriterAddBlockResult
         if (!st.ok()) {
             _cancel_with_msg(st.to_string());
         } else if (ctx._is_last_rpc) {
-            bool skip_tablet_info = false;
-            
DBUG_EXECUTE_IF("VNodeChannel.add_block_success_callback.incomplete_commit_info",
-                            { skip_tablet_info = true; });
             for (const auto& tablet : result.tablet_vec()) {
                 
DBUG_EXECUTE_IF("VNodeChannel.add_block_success_callback.incomplete_commit_info",
 {
-                    if (skip_tablet_info) {
-                        LOG(INFO) << "skip tablet info: " << 
tablet.tablet_id();
-                        skip_tablet_info = false;
+                    auto target_tablet_id = dp->param<int64_t>("tablet_id", 
-1);
+                    if (tablet.tablet_id() == target_tablet_id) {
+                        LOG(INFO) << "skip tablet info: " << tablet.tablet_id()
+                                  << ", backend_id: " << _node_id;
                         continue;
                     }
                 });
diff --git 
a/regression-test/suites/fault_injection_p0/test_incomplete_commit_info.groovy 
b/regression-test/suites/fault_injection_p0/test_incomplete_commit_info.groovy
index 2b6503a929e..7394fa9ac5c 100644
--- 
a/regression-test/suites/fault_injection_p0/test_incomplete_commit_info.groovy
+++ 
b/regression-test/suites/fault_injection_p0/test_incomplete_commit_info.groovy
@@ -41,7 +41,23 @@ suite("test_incomplete_commit_info", "nonConcurrent") {
             ) engine=olap
             DISTRIBUTED BY HASH(`k1`) BUCKETS 5 properties("replication_num" = 
"1")
             """
-        
GetDebugPoint().enableDebugPointForAllBEs("VNodeChannel.add_block_success_callback.incomplete_commit_info")
+
+        streamLoad {
+            table "${tableName}"
+            db "regression_test_fault_injection_p0"
+            set 'column_separator', ','
+            file "baseall.txt"
+        }
+
+        def tabletIds = sql_return_maparray("SHOW TABLETS FROM ${tableName}")
+                .collect { it.TabletId }
+                .unique()
+        def tabletId = tabletIds.find {
+            sql("SELECT COUNT(*) FROM ${tableName} 
TABLET(${it})")[0][0].toLong() > 0
+        }
+        GetDebugPoint().enableDebugPointForAllBEs(
+                
"VNodeChannel.add_block_success_callback.incomplete_commit_info",
+                [tablet_id: "${tabletId}"])
         streamLoad {
             table "${tableName}"
             db "regression_test_fault_injection_p0"
@@ -55,9 +71,11 @@ suite("test_incomplete_commit_info", "nonConcurrent") {
                 log.info("Stream load result: ${result}".toString())
                 def json = parseJson(result)
                 assertEquals("fail", json.Status.toLowerCase())
+                assertTrue(json.Message.contains("Failed to commit txn"))
+                assertTrue(json.Message.contains("succ replica num 0 < load 
required replica num 1"))
             }
         }
     } finally {
         
GetDebugPoint().disableDebugPointForAllBEs("VNodeChannel.add_block_success_callback.incomplete_commit_info")
     }
-}
\ No newline at end of file
+}


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

Reply via email to