yiguolei commented on code in PR #50817:
URL: https://github.com/apache/doris/pull/50817#discussion_r2115420945
##########
be/src/runtime/query_context.cpp:
##########
@@ -381,20 +381,27 @@ void QueryContext::set_pipeline_context(
}
doris::pipeline::TaskScheduler* QueryContext::get_pipe_exec_scheduler() {
- if (workload_group()) {
- if (_task_scheduler) {
- return _task_scheduler;
- }
+ if (!_task_scheduler) {
+ throw Exception(Status::InternalError("task_scheduler is null"));
}
- return _exec_env->pipeline_task_scheduler();
+ return _task_scheduler;
}
-void QueryContext::set_workload_group(WorkloadGroupPtr& wg) {
- _resource_ctx->set_workload_group(wg);
- // Should add query first, then the workload group will not be deleted.
+Status QueryContext::set_workload_group(WorkloadGroupPtr& wg) {
+ // resource_ctx use dummmy wg as default wg.
+ // if user specify a wg, then set it in resource_ctx.
+ if (wg) {
+ _resource_ctx->set_workload_group(wg);
+ }
Review Comment:
else 需要打印异常日志,打印异常栈,我们这里不应该set nullptr
--
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]