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

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

commit 2a77858845650c0c96a3707352d36a74c30a38ec
Author: Kaijie Chen <c...@apache.org>
AuthorDate: Fri Jan 12 09:08:06 2024 +0800

    [fix](move-memtable) check all streams for failed reason (#29877)
---
 be/src/vec/sink/writer/vtablet_writer_v2.cpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/be/src/vec/sink/writer/vtablet_writer_v2.cpp 
b/be/src/vec/sink/writer/vtablet_writer_v2.cpp
index 1f1ed6591d2..12636088871 100644
--- a/be/src/vec/sink/writer/vtablet_writer_v2.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer_v2.cpp
@@ -572,9 +572,11 @@ Status VTabletWriterV2::close(Status exec_status) {
             }
             auto backends = _location->find_tablet(tablet_id)->node_ids;
             for (auto& backend_id : backends) {
-                auto failed_tablets = 
_streams_for_node[backend_id]->streams()[0]->failed_tablets();
-                if (failed_tablets.contains(tablet_id)) {
-                    return failed_tablets[tablet_id];
+                for (const auto& stream : 
_streams_for_node[backend_id]->streams()) {
+                    const auto& failed_tablets = stream->failed_tablets();
+                    if (failed_tablets.contains(tablet_id)) {
+                        return failed_tablets.at(tablet_id);
+                    }
                 }
             }
             DCHECK(false) << "failed tablet " << tablet_id << " should have 
failed reason";


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

Reply via email to