yiguolei commented on code in PR #31651: URL: https://github.com/apache/doris/pull/31651#discussion_r1510000341
########## be/src/pipeline/pipeline_x/pipeline_x_fragment_context.cpp: ########## @@ -108,9 +108,8 @@ PipelineXFragmentContext::~PipelineXFragmentContext() { if (!_task_runtime_states.empty()) { // The memory released by the query end is recorded in the query mem tracker, main memory in _runtime_state. Review Comment: not modify this logic, it is very dangerous. Currently, there are many threads in doris, we use pipeline fragment context's weak ptr to make sure that the related resource is not released during another thread. All resources or objects that will be accessed between threads should be in pipeline fragment context. For example, the profile is in runtime state and the profile will also be accessed in async result writer thread. If the pipeline finished and the runtime state will be released, it will core. And also the rpc thread callback. -- 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