yiguolei commented on code in PR #32783: URL: https://github.com/apache/doris/pull/32783#discussion_r1540355839
########## be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp: ########## @@ -244,8 +244,16 @@ Status PartitionedAggSinkLocalState::revoke_memory(RuntimeState* state) { } } }}; + + auto execution_context_ = state->get_task_execution_context(); + _shared_state_holder = _shared_state->shared_from_this(); + status = ExecEnv::GetInstance()->spill_stream_mgr()->get_async_task_thread_pool()->submit_func( - [this, &parent, state] { + [this, &parent, state, execution_context_] { Review Comment: Has to use value to copy the variable, not use reference in lambda object. Because the referenced object maybe destroyed. You could refer this PR https://github.com/apache/doris/pull/32132/files -- 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