yiguolei commented on code in PR #48986:
URL: https://github.com/apache/doris/pull/48986#discussion_r1995146570


##########
be/src/runtime/workload_group/dummy_workload_group.cpp:
##########
@@ -0,0 +1,47 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#include "runtime/workload_group/dummy_workload_group.h"
+
+#include "runtime/exec_env.h"
+#include "util/threadpool.h"
+#include "vec/exec/scan/scanner_scheduler.h"
+
+namespace doris {
+
+void DummyWorkloadGroup::get_query_scheduler(
+        doris::pipeline::TaskScheduler** exec_sched,
+        vectorized::SimplifiedScanScheduler** scan_sched,
+        vectorized::SimplifiedScanScheduler** remote_scan_sched) {
+    *exec_sched = ExecEnv::GetInstance()->pipeline_task_scheduler();
+    *scan_sched = 
ExecEnv::GetInstance()->scanner_scheduler()->get_local_scan_thread_pool();
+    *remote_scan_sched = 
ExecEnv::GetInstance()->scanner_scheduler()->get_remote_scan_thread_pool();
+}
+
+/*
+    Usually it's elegant to get all thread pool from query context, but 
memtable flush pool is different.
+    Because memtable flush task is not managed by query context, query context 
maybe destroyed while memtable flush task
+    is still working.
+    So currently memtable flush task can only get memtable flush pool from 
workload group.
+    For dummpy workload group, it should return nullptr;
+    Refer FlushToken::submit;
+*/
+ThreadPool* DummyWorkloadGroup::get_memtable_flush_pool_ptr() {
+    return nullptr;

Review Comment:
   这个地方,能否return 一个正常的pool,别nullptr,容易挂。比如我们return 全局的那个



-- 
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]

Reply via email to