wangbo commented on code in PR #25489:
URL: https://github.com/apache/doris/pull/25489#discussion_r1360553401
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -640,21 +648,28 @@ Status FragmentMgr::_get_query_ctx(const Params& params,
TUniqueId query_id, boo
if constexpr (std::is_same_v<TPipelineFragmentParams, Params>) {
if (params.__isset.workload_groups &&
!params.workload_groups.empty()) {
taskgroup::TaskGroupInfo task_group_info;
- int query_cpu_hard_limit = -1;
- auto status = taskgroup::TaskGroupInfo::parse_group_info(
- params.workload_groups[0], &task_group_info,
&query_cpu_hard_limit);
+ auto status =
taskgroup::TaskGroupInfo::parse_group_info(params.workload_groups[0],
+
&task_group_info);
if (status.ok()) {
auto tg =
_exec_env->task_group_manager()->get_or_create_task_group(
task_group_info);
tg->add_mem_tracker_limiter(query_ctx->query_mem_tracker);
- query_ctx->set_task_group(tg);
+ uint64_t tg_id = tg->id();
+ std::string tg_name = tg->name();
LOG(INFO) << "Query/load id: " <<
print_id(query_ctx->query_id())
<< " use task group: " << tg->debug_string()
- << " query_cpu_hard_limit: " <<
query_cpu_hard_limit
+ << " cpu_hard_limit: " <<
task_group_info.cpu_hard_limit
<< " cpu_share:" << task_group_info.cpu_share;
- if (query_cpu_hard_limit > 0 &&
_exec_env->get_cgroup_cpu_ctl() != nullptr) {
- _exec_env->get_cgroup_cpu_ctl()->update_cpu_hard_limit(
- query_cpu_hard_limit);
+ if (task_group_info.cpu_hard_limit > 0) {
+ Status ret = create_and_get_task_scheduler(
Review Comment:
cpu_hard_limit小于0的时候走的soft limit
##########
be/src/runtime/fragment_mgr.cpp:
##########
@@ -640,21 +648,28 @@ Status FragmentMgr::_get_query_ctx(const Params& params,
TUniqueId query_id, boo
if constexpr (std::is_same_v<TPipelineFragmentParams, Params>) {
if (params.__isset.workload_groups &&
!params.workload_groups.empty()) {
taskgroup::TaskGroupInfo task_group_info;
- int query_cpu_hard_limit = -1;
- auto status = taskgroup::TaskGroupInfo::parse_group_info(
- params.workload_groups[0], &task_group_info,
&query_cpu_hard_limit);
+ auto status =
taskgroup::TaskGroupInfo::parse_group_info(params.workload_groups[0],
+
&task_group_info);
if (status.ok()) {
auto tg =
_exec_env->task_group_manager()->get_or_create_task_group(
task_group_info);
tg->add_mem_tracker_limiter(query_ctx->query_mem_tracker);
- query_ctx->set_task_group(tg);
+ uint64_t tg_id = tg->id();
+ std::string tg_name = tg->name();
LOG(INFO) << "Query/load id: " <<
print_id(query_ctx->query_id())
<< " use task group: " << tg->debug_string()
- << " query_cpu_hard_limit: " <<
query_cpu_hard_limit
+ << " cpu_hard_limit: " <<
task_group_info.cpu_hard_limit
<< " cpu_share:" << task_group_info.cpu_share;
- if (query_cpu_hard_limit > 0 &&
_exec_env->get_cgroup_cpu_ctl() != nullptr) {
- _exec_env->get_cgroup_cpu_ctl()->update_cpu_hard_limit(
- query_cpu_hard_limit);
+ if (task_group_info.cpu_hard_limit > 0) {
+ Status ret = create_and_get_task_scheduler(
Review Comment:
cpu_hard_limit小于0的时候走的soft limit
--
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]