liutang123 commented on code in PR #23142: URL: https://github.com/apache/doris/pull/23142#discussion_r1299167577
########## be/src/pipeline/pipeline_fragment_context.cpp: ########## @@ -824,11 +750,23 @@ Status PipelineFragmentContext::_create_sink(int sender_id, const TDataSink& thr } void PipelineFragmentContext::_close_action() { - _runtime_profile->total_time_counter()->update(_fragment_watcher.elapsed_time()); - send_report(true); - _stop_report_thread(); + auto close_time = _fragment_watcher.elapsed_time(); + _runtime_profile->total_time_counter()->update(close_time); + COUNTER_UPDATE(_close_timer, close_time); // all submitted tasks done - _exec_env->fragment_mgr()->remove_pipeline_context(shared_from_this()); + _exec_env->send_report_thread_pool()->submit_func([&, this] { Review Comment: `remove_pipeline_context` will exected after `send_report`. So, I think `PipelineFragmentContext` can not be released. -- 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