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 9f0300568f1 [fix](move-memtable) fix potential duplicate of 
TabletStream profile (#30397)
9f0300568f1 is described below

commit 9f0300568f15c1aa391956c02618c2d340cbbf3e
Author: Kaijie Chen <c...@apache.org>
AuthorDate: Mon Jan 29 19:51:44 2024 +0800

    [fix](move-memtable) fix potential duplicate of TabletStream profile 
(#30397)
---
 be/src/runtime/load_stream.cpp       | 2 +-
 be/test/runtime/load_stream_test.cpp | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/be/src/runtime/load_stream.cpp b/be/src/runtime/load_stream.cpp
index cbd52251b29..4450d40ad9b 100644
--- a/be/src/runtime/load_stream.cpp
+++ b/be/src/runtime/load_stream.cpp
@@ -292,8 +292,8 @@ Status 
IndexStream::_init_tablet_stream(TabletStreamSharedPtr& tablet_stream, in
                                         int64_t partition_id) {
     tablet_stream = std::make_shared<TabletStream>(_load_id, tablet_id, 
_txn_id, _load_stream_mgr,
                                                    _profile);
-    RETURN_IF_ERROR(tablet_stream->init(_schema, _id, partition_id));
     _tablet_streams_map[tablet_id] = tablet_stream;
+    RETURN_IF_ERROR(tablet_stream->init(_schema, _id, partition_id));
     return Status::OK();
 }
 
diff --git a/be/test/runtime/load_stream_test.cpp 
b/be/test/runtime/load_stream_test.cpp
index 70e59a81f27..89535642436 100644
--- a/be/test/runtime/load_stream_test.cpp
+++ b/be/test/runtime/load_stream_test.cpp
@@ -807,7 +807,8 @@ TEST_F(LoadStreamMgrTest, one_client_abnormal_tablet) {
     wait_for_ack(3);
     EXPECT_EQ(g_response_stat.num, 3);
     EXPECT_EQ(g_response_stat.success_tablet_ids.size(), 0);
-    EXPECT_EQ(g_response_stat.failed_tablet_ids.size(), 1);
+    EXPECT_EQ(g_response_stat.failed_tablet_ids.size(), 2);
+    EXPECT_EQ(g_response_stat.failed_tablet_ids[1], ABNORMAL_TABLET_ID);
 
     // server will close stream on CLOSE_LOAD
     wait_for_close();


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

Reply via email to