Skip to content

Commit

Permalink
log scan thread num
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbo committed Feb 19, 2024
1 parent 682a0ad commit d29e425
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
9 changes: 6 additions & 3 deletions be/src/runtime/task_group/task_group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,17 @@ TaskGroup::TaskGroup(const TaskGroupInfo& tg_info)
_enable_memory_overcommit(tg_info.enable_memory_overcommit),
_cpu_share(tg_info.cpu_share),
_mem_tracker_limiter_pool(MEM_TRACKER_GROUP_NUM),
_cpu_hard_limit(tg_info.cpu_hard_limit) {}
_cpu_hard_limit(tg_info.cpu_hard_limit),
_scan_thread_num(tg_info.scan_thread_num) {}

std::string TaskGroup::debug_string() const {
std::shared_lock<std::shared_mutex> rl {_mutex};
return fmt::format(
"TG[id = {}, name = {}, cpu_share = {}, memory_limit = {}, enable_memory_overcommit = "
"{}, version = {}, cpu_hard_limit = {}]",
"{}, version = {}, cpu_hard_limit = {}, scan_thread_num = {}]",
_id, _name, cpu_share(), PrettyPrinter::print(_memory_limit, TUnit::BYTES),
_enable_memory_overcommit ? "true" : "false", _version, cpu_hard_limit());
_enable_memory_overcommit ? "true" : "false", _version, cpu_hard_limit(),
_scan_thread_num);
}

void TaskGroup::check_and_update(const TaskGroupInfo& tg_info) {
Expand All @@ -81,6 +83,7 @@ void TaskGroup::check_and_update(const TaskGroupInfo& tg_info) {
_enable_memory_overcommit = tg_info.enable_memory_overcommit;
_cpu_share = tg_info.cpu_share;
_cpu_hard_limit = tg_info.cpu_hard_limit;
_scan_thread_num = tg_info.scan_thread_num;
} else {
return;
}
Expand Down
1 change: 1 addition & 0 deletions be/src/runtime/task_group/task_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class TaskGroup : public std::enable_shared_from_this<TaskGroup> {
std::atomic<uint64_t> _cpu_share;
std::vector<TgTrackerLimiterGroup> _mem_tracker_limiter_pool;
std::atomic<int> _cpu_hard_limit;
std::atomic<int> _scan_thread_num;

// means task group is mark dropped
// new query can not submit
Expand Down

0 comments on commit d29e425

Please sign in to comment.