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 4b0de94658b [log](debug) Add logs for task scheduler (#60090)
4b0de94658b is described below
commit 4b0de94658b67891b52df40b60280905d9d3e60f
Author: Gabriel <[email protected]>
AuthorDate: Wed Jan 21 16:23:24 2026 +0800
[log](debug) Add logs for task scheduler (#60090)
---
be/src/pipeline/task_scheduler.h | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/be/src/pipeline/task_scheduler.h b/be/src/pipeline/task_scheduler.h
index 269116b5e4f..156219a8275 100644
--- a/be/src/pipeline/task_scheduler.h
+++ b/be/src/pipeline/task_scheduler.h
@@ -57,22 +57,26 @@ public:
return {{_name, _fix_thread_pool->debug_info()}};
}
+protected:
+ std::string _name;
+ bool _need_to_stop = false;
+ bool _shutdown = false;
+ const int _num_threads;
+
private:
friend class HybridTaskScheduler;
TaskScheduler(int core_num, std::string name,
std::shared_ptr<CgroupCpuCtl> cgroup_cpu_ctl)
: _name(std::move(name)),
- _task_queue(core_num),
_num_threads(core_num),
- _cgroup_cpu_ctl(cgroup_cpu_ctl) {}
- TaskScheduler() : _task_queue(0), _num_threads(0) {}
- std::string _name;
+ _task_queue(core_num),
+ _cgroup_cpu_ctl(cgroup_cpu_ctl) {
+ LOG(INFO) << "TaskScheduler " << _name << " created with " << core_num
<< " threads.";
+ }
+ TaskScheduler() : _num_threads(0), _task_queue(0) {}
std::unique_ptr<ThreadPool> _fix_thread_pool;
MultiCoreTaskQueue _task_queue;
- bool _need_to_stop = false;
- bool _shutdown = false;
- const int _num_threads;
std::weak_ptr<CgroupCpuCtl> _cgroup_cpu_ctl;
void _do_work(int index);
@@ -85,6 +89,14 @@ public:
: _blocking_scheduler(blocking_exec_thread_num, name +
"_blocking_scheduler",
cgroup_cpu_ctl),
_simple_scheduler(exec_thread_num, name + "_simple_scheduler",
cgroup_cpu_ctl) {}
+ ~HybridTaskScheduler() override {
+ DCHECK(_blocking_scheduler._shutdown)
+ << _blocking_scheduler._name << ": " <<
_blocking_scheduler._shutdown << " "
+ << _blocking_scheduler._need_to_stop << " " <<
_blocking_scheduler._num_threads;
+ DCHECK(_simple_scheduler._shutdown)
+ << _simple_scheduler._name << ": " <<
_simple_scheduler._shutdown << " "
+ << _simple_scheduler._need_to_stop << " " <<
_simple_scheduler._num_threads;
+ }
Status submit(PipelineTaskSPtr task) override;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]