yiguolei commented on code in PR #40270: URL: https://github.com/apache/doris/pull/40270#discussion_r1756222810
########## be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp: ########## @@ -693,6 +701,36 @@ Status PipelineXFragmentContext::_build_pipeline_tasks( std::lock_guard<std::mutex> l(_state_map_lock); _runtime_filter_mgr_map[fragment_instance_id] = std::move(runtime_filter_mgr); } + return Status::OK(); + }; + if (target_size > 1) { + Status prepare_status[target_size]; + std::mutex m; + std::condition_variable cv; + int prepare_done = 0; + for (size_t i = 0; i < target_size; i++) { + RETURN_IF_ERROR(thread_pool->submit_func([&, i]() { + SCOPED_ATTACH_TASK(_query_ctx.get()); + prepare_status[i] = pre_and_submit(i, this); + std::unique_lock<std::mutex> lock(m); + prepare_done++; + if (prepare_done == target_size) { + cv.notify_one(); + } + })); + } + std::unique_lock<std::mutex> lock(m); + if (prepare_done != target_size) { + cv.wait(lock); Review Comment: 这里得有一个超时时间,不能无限期等待 -- 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