yiguolei commented on code in PR #32783:
URL: https://github.com/apache/doris/pull/32783#discussion_r1540356572


##########
be/src/pipeline/exec/partitioned_aggregation_source_operator.cpp:
##########
@@ -196,9 +196,17 @@ Status 
PartitionedAggLocalState::initiate_merge_spill_partition_agg_data(Runtime
     
RETURN_IF_ERROR(Base::_shared_state->in_mem_shared_state->reset_hash_table());
     _dependency->Dependency::block();
 
+    auto execution_context_ = state->get_task_execution_context();
+    _shared_state_holder = _shared_state->shared_from_this();
     RETURN_IF_ERROR(
             
ExecEnv::GetInstance()->spill_stream_mgr()->get_async_task_thread_pool()->submit_func(
-                    [this, state] {
+                    [this, state, execution_context_] {
+                        auto execution_context = execution_context_.lock();
+                        if (!execution_context) {
+                            // FIXME: return status is meaningless?
+                            return Status::Cancelled("Cancelled");

Review Comment:
   Should print log here.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to