Gabriel39 commented on code in PR #36305: URL: https://github.com/apache/doris/pull/36305#discussion_r1643694899
########## be/src/runtime/buffer_control_block.cpp: ########## @@ -290,18 +277,25 @@ void BufferControlBlock::cancel() { } void BufferControlBlock::set_dependency( - std::shared_ptr<pipeline::Dependency> result_sink_dependency) { - _result_sink_dependencys.push_back(result_sink_dependency); + const TUniqueId& id, std::shared_ptr<pipeline::Dependency> result_sink_dependency) { + std::unique_lock<std::mutex> l(_lock); + _result_sink_dependencys[id] = result_sink_dependency; + _update_dependency(); } void BufferControlBlock::_update_dependency() { - if (_batch_queue_empty || _buffer_rows < _buffer_limit || _is_cancelled) { - for (auto dependency : _result_sink_dependencys) { - dependency->set_ready(); + if (_is_cancelled) { + for (auto it : _result_sink_dependencys) { + it.second->set_ready(); Review Comment: ```suggestion it.second->set_always_ready(); ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org