yiguolei commented on code in PR #30279:
URL: https://github.com/apache/doris/pull/30279#discussion_r1463108802
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -685,20 +685,22 @@ Status FragmentMgr::_get_query_ctx(const Params& params,
TUniqueId query_id, boo
if (params.__isset.workload_groups && !params.workload_groups.empty())
{
uint64_t tg_id = params.workload_groups[0].id;
auto* tg_mgr = _exec_env->task_group_manager();
- if (auto task_group_ptr = tg_mgr->get_task_group_by_id(tg_id)) {
-
task_group_ptr->add_mem_tracker_limiter(query_ctx->query_mem_tracker);
- // set task group to queryctx for memory tracker can be
removed, see QueryContext's destructor
- query_ctx->set_task_group(task_group_ptr);
-
_exec_env->runtime_query_statistics_mgr()->set_workload_group_id(print_id(query_id),
-
tg_id);
- query_ctx->set_query_scheduler(tg_id);
-
- LOG(INFO) << "Query/load id: " <<
print_id(query_ctx->query_id())
- << ", use task group: " <<
task_group_ptr->debug_string()
- << ", is pipeline: " << ((int)is_pipeline)
- << ", enable cgroup soft limit: "
- << ((int)config::enable_cgroup_cpu_soft_limit);
+ taskgroup::TaskGroupPtr task_group_ptr = nullptr;
+ Status ret = tg_mgr->add_query_to_group(tg_id,
query_ctx->query_id(), &task_group_ptr);
+ if (!ret.ok()) {
Review Comment:
use return_if_error
--
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]