This is an automated email from the ASF dual-hosted git repository.
gabriellee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 721282242b3 [pipelineX](bug) Fix potential memory access problem
(#27326)
721282242b3 is described below
commit 721282242b3691a9adf98e77180e1638600fc715
Author: Gabriel <[email protected]>
AuthorDate: Tue Nov 21 14:36:25 2023 +0800
[pipelineX](bug) Fix potential memory access problem (#27326)
---
be/src/pipeline/task_scheduler.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/be/src/pipeline/task_scheduler.cpp
b/be/src/pipeline/task_scheduler.cpp
index 121fbd93249..e989af75b20 100644
--- a/be/src/pipeline/task_scheduler.cpp
+++ b/be/src/pipeline/task_scheduler.cpp
@@ -80,10 +80,12 @@ Status BlockedTaskScheduler::add_blocked_task(PipelineTask*
task) {
if (!static_cast<PipelineXTask*>(task)->push_blocked_task_to_queue()) {
// put this task into current dependency's blocking queue and wait for
event notification
// instead of using a separate BlockedTaskScheduler.
+ task->set_running(false);
return Status::OK();
}
_blocked_tasks.push_back(task);
_task_cond.notify_one();
+ task->set_running(false);
return Status::OK();
}
@@ -337,7 +339,6 @@ void TaskScheduler::_do_work(size_t index) {
}
auto pipeline_state = task->get_state();
- task->set_running(false);
switch (pipeline_state) {
case PipelineTaskState::BLOCKED_FOR_SOURCE:
case PipelineTaskState::BLOCKED_FOR_SINK:
@@ -346,6 +347,7 @@ void TaskScheduler::_do_work(size_t index) {
static_cast<void>(_blocked_task_scheduler->add_blocked_task(task));
break;
case PipelineTaskState::RUNNABLE:
+ task->set_running(false);
static_cast<void>(_task_queue->push_back(task, index));
break;
default:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]