This is an automated email from the ASF dual-hosted git repository.
hello-stephen 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 b4aa99ecbd4 [fix](regression) Make incomplete commit info injection
deterministic (#65633)
b4aa99ecbd4 is described below
commit b4aa99ecbd405c938779ebac856938a3792babe3
Author: shuke <[email protected]>
AuthorDate: Thu Jul 16 17:00:31 2026 +0800
[fix](regression) Make incomplete commit info injection deterministic
(#65633)
Related PR: #53979
Problem Summary:
`test_incomplete_commit_info` expects stream load to fail after the
debug point removes tablet commit information. The debug point
previously skipped the first tablet independently in every
`VNodeChannel`. With multiple buckets, those skipped entries could
belong to different tablets, so every tablet could still retain the
required replica quorum and the load would legally succeed.
This change makes the injection deterministic:
- the debug point skips commit info only for an explicitly supplied
`tablet_id`;
- the regression case keeps its five-bucket layout, performs a
successful seed load, then uses tablet-scoped queries to select a tablet
that actually received rows;
- the fault-injection load reuses the same input, so hash routing
guarantees that the selected tablet participates again;
- the debug log records both the selected tablet and destination
backend.
Normal load behavior is unchanged when debug points are disabled. The
debug point has only this one in-repository caller, which is updated in
the same change.
---
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 9f86cd707d2..5bd43f88726 100644
--- a/be/src/exec/sink/writer/vtablet_writer.cpp
+++ b/be/src/exec/sink/writer/vtablet_writer.cpp
@@ -1266,14 +1266,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]