yiguolei commented on code in PR #33229:
URL: https://github.com/apache/doris/pull/33229#discussion_r1549616902
##########
be/src/pipeline/exec/partitioned_aggregation_sink_operator.cpp:
##########
@@ -258,28 +256,33 @@ Status
PartitionedAggSinkLocalState::revoke_memory(RuntimeState* state) {
[this, &parent, state, execution_context, submit_timer] {
auto execution_context_lock = execution_context.lock();
if (!execution_context_lock) {
- LOG(INFO) << "execution_context released, maybe query was
cancelled.";
+ LOG(INFO) << "query " << print_id(state->query_id())
+ << " execution_context released, maybe query was
cancelled.";
return Status::Cancelled("Cancelled");
}
_spill_wait_in_queue_timer->update(submit_timer.elapsed_time());
SCOPED_ATTACH_TASK(state);
SCOPED_TIMER(Base::_spill_timer);
Defer defer {[&]() {
- if (!Base::_shared_state->sink_status.ok()) {
- LOG(WARNING)
- << "agg node " << Base::_parent->id()
- << " revoke_memory error: " <<
Base::_shared_state->sink_status;
+ if (!_shared_state->sink_status.ok() ||
state->is_cancelled()) {
+ if (!_shared_state->sink_status.ok()) {
+ LOG(WARNING)
+ << "query " << print_id(state->query_id())
<< " agg node "
+ << Base::_parent->id()
+ << " revoke_memory error: " <<
Base::_shared_state->sink_status;
+ }
+ _shared_state->close();
Review Comment:
可能这么改是错的。
因为close 方法并不是线程安全的。在这里调用close,可能会跟pipelinex thread 调用close 冲突
--
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]