yiguolei commented on code in PR #56755:
URL: https://github.com/apache/doris/pull/56755#discussion_r2428711239
##########
be/src/pipeline/pipeline_task.cpp:
##########
@@ -805,22 +813,36 @@ size_t PipelineTask::get_revocable_size() const {
}
Status PipelineTask::revoke_memory(const std::shared_ptr<SpillContext>&
spill_context) {
+ DCHECK(spill_context);
if (is_finalized()) {
- if (spill_context) {
- spill_context->on_task_finished();
- VLOG_DEBUG << "Query: " << print_id(_state->query_id()) << ",
task: " << ((void*)this)
- << " finalized";
- }
+ spill_context->on_task_finished();
+ VLOG_DEBUG << "Query: " << print_id(_state->query_id()) << ", task: "
<< ((void*)this)
+ << " finalized";
+ return Status::OK();
+ }
+
+ if (_spill_context) {
+ LOG(INFO) << "Query: " << print_id(_state->query_id()) << ", task: "
<< ((void*)this)
+ << " is already spilling";
+ spill_context->on_task_finished();
return Status::OK();
}
const auto revocable_size = _sink->revocable_mem_size(_state);
if (revocable_size >= vectorized::SpillStream::MIN_SPILL_WRITE_BATCH_MEM) {
_need_to_revoke_memory = true;
_spill_context = spill_context;
+
+ auto* dep = _blocked_dep;
Review Comment:
这个逻辑放在这里可能不对。
即使838 行,我们remove 了当前的dep,但是可能下一个时刻一个正在running 的task 还是会更新一个dep
这个逻辑,得在 pipeline task的execute 方法里执行才行。
--
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]