yiguolei commented on code in PR #41264: URL: https://github.com/apache/doris/pull/41264#discussion_r1775044092
########## be/src/pipeline/exec/spill_utils.h: ########## @@ -28,6 +34,28 @@ namespace doris::pipeline { using SpillPartitionerType = vectorized::Crc32HashPartitioner<vectorized::SpillPartitionChannelIds>; +struct SpillContext { + std::atomic_int running_tasks_count {0}; + std::function<void()> all_tasks_finished_callback; + + SpillContext(std::function<void()> all_tasks_finished_callback_) + : all_tasks_finished_callback(std::move(all_tasks_finished_callback_)) {} + + void on_task_created() { running_tasks_count.fetch_add(1); } Review Comment: 为什么要有这个函数? 直接在spill context 创建的时候,就知道有多少个task啊 -- 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