yiguolei commented on code in PR #55709:
URL: https://github.com/apache/doris/pull/55709#discussion_r2325453316
##########
be/src/pipeline/pipeline_task.h:
##########
@@ -66,15 +72,20 @@ class PipelineTask : public
std::enable_shared_from_this<PipelineTask> {
std::weak_ptr<PipelineFragmentContext>& fragment_context() { return
_fragment_context; }
- int get_core_id() const { return _core_id; }
+ void set_on_blocking_scheduler(bool blocking_scheduler) {
+ _on_blocking_scheduler = blocking_scheduler;
+ }
+ int get_thread_id() const {
+ return _on_blocking_scheduler ? _tracking.blocking_thread_id :
_tracking.simple_thread_id;
+ }
- PipelineTask& set_core_id(int id) {
- if (id != _core_id) {
- if (_core_id != -1) {
- COUNTER_UPDATE(_core_change_times, 1);
- }
- _core_id = id;
+ PipelineTask& set_thread_id(int thread_id) {
+ if (_on_blocking_scheduler) {
+ _tracking.blocking_thread_id = thread_id;
+ } else {
+ _tracking.simple_thread_id = thread_id;
Review Comment:
不要这么做。pipeline task 本身不应该感知到自己是在哪个调度器里,hybrid task scheduler 随时可能结构变化。
可以考虑每次用自己记录的core id % 目标queue 的sub queue 数量来避免core
--
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]