You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by da...@apache.org on 2024/01/04 15:03:05 UTC

(doris) branch master updated: [improve](move-memtable) add stream sink file writer finalize fault injection (#29552)

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

dataroaring 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 99edbaf3cf1 [improve](move-memtable) add stream sink file writer finalize fault injection (#29552)
99edbaf3cf1 is described below

commit 99edbaf3cf1dc8849de5cb647e4aed460b399e54
Author: HHoflittlefish777 <77...@users.noreply.github.com>
AuthorDate: Thu Jan 4 23:02:58 2024 +0800

    [improve](move-memtable) add stream sink file writer finalize fault injection (#29552)
---
 be/src/io/fs/stream_sink_file_writer.cpp                                | 1 +
 .../fault_injection_p0/test_load_stream_stub_failure_injection.groovy   | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/be/src/io/fs/stream_sink_file_writer.cpp b/be/src/io/fs/stream_sink_file_writer.cpp
index 8a14f667d1f..cfc924fad0a 100644
--- a/be/src/io/fs/stream_sink_file_writer.cpp
+++ b/be/src/io/fs/stream_sink_file_writer.cpp
@@ -128,6 +128,7 @@ Status StreamSinkFileWriter::finalize() {
                          << ", reason: " << st;
         }
     }
+    DBUG_EXECUTE_IF("StreamSinkFileWriter.finalize.finalize_failed", { ok = false; });
     if (!ok) {
         std::stringstream ss;
         for (auto& stream : _streams) {
diff --git a/regression-test/suites/fault_injection_p0/test_load_stream_stub_failure_injection.groovy b/regression-test/suites/fault_injection_p0/test_load_stream_stub_failure_injection.groovy
index 7ad2b1e71eb..0f75cb12a62 100644
--- a/regression-test/suites/fault_injection_p0/test_load_stream_stub_failure_injection.groovy
+++ b/regression-test/suites/fault_injection_p0/test_load_stream_stub_failure_injection.groovy
@@ -83,6 +83,8 @@ suite("test_stream_stub_fault_injection", "nonConcurrent") {
 
     // StreamSinkFileWriter appendv write segment failed all replica
     load_with_injection("StreamSinkFileWriter.appendv.write_segment_failed_all_replica", "failed to write any replicas")
+    // StreamSinkFileWriter finalize failed
+    load_with_injection("StreamSinkFileWriter.finalize.finalize_failed", "failed to finalize any replicas")
     // LoadStreams stream wait failed
     load_with_injection("LoadStreamStub._send_with_retry.stream_write_failed", "StreamWrite failed, err=32")
     // LoadStreams keeping stream when release


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