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

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


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new c84c0a8c8b4 branch-3.0: [fix](data stream) Fix dead loop in 
VDataStreamMgr's de-constructor #46968 (#46987)
c84c0a8c8b4 is described below

commit c84c0a8c8b47b4d9c88be58f75b8fd656e58508d
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Jan 15 11:02:36 2025 +0800

    branch-3.0: [fix](data stream) Fix dead loop in VDataStreamMgr's 
de-constructor #46968 (#46987)
    
    Cherry-picked from #46968
    
    Co-authored-by: Gabriel <liwenqi...@selectdb.com>
---
 be/src/pipeline/exec/operator.h         | 5 ++++-
 be/src/vec/runtime/vdata_stream_mgr.cpp | 1 +
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/be/src/pipeline/exec/operator.h b/be/src/pipeline/exec/operator.h
index c84c4e7b43f..fcd28f96d6e 100644
--- a/be/src/pipeline/exec/operator.h
+++ b/be/src/pipeline/exec/operator.h
@@ -426,7 +426,10 @@ private:
 class DataSinkOperatorXBase : public OperatorBase {
 public:
     DataSinkOperatorXBase(const int operator_id, const int node_id)
-            : OperatorBase(), _operator_id(operator_id), _node_id(node_id), 
_dests_id({1}) {}
+            : OperatorBase(),
+              _operator_id(operator_id),
+              _node_id(node_id),
+              _dests_id({operator_id}) {}
 
     DataSinkOperatorXBase(const int operator_id, const int node_id, const int 
dest_id)
             : OperatorBase(), _operator_id(operator_id), _node_id(node_id), 
_dests_id({dest_id}) {}
diff --git a/be/src/vec/runtime/vdata_stream_mgr.cpp 
b/be/src/vec/runtime/vdata_stream_mgr.cpp
index 78067b9b181..d499fd8e2b9 100644
--- a/be/src/vec/runtime/vdata_stream_mgr.cpp
+++ b/be/src/vec/runtime/vdata_stream_mgr.cpp
@@ -46,6 +46,7 @@ VDataStreamMgr::~VDataStreamMgr() {
         // Could not call close directly, because during close method, it will 
remove itself
         // from the map, and modify the map, it will core.
         receivers.push_back(receiver_iterator->second);
+        receiver_iterator++;
     }
     for (auto iter = receivers.begin(); iter != receivers.end(); ++iter) {
         (*iter)->close();


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

Reply via email to