xinyiZzz commented on code in PR #33797:
URL: https://github.com/apache/doris/pull/33797#discussion_r1570294754
##########
be/src/runtime/workload_group/workload_group.cpp:
##########
@@ -142,18 +142,42 @@ void
WorkloadGroup::remove_mem_tracker_limiter(std::shared_ptr<MemTrackerLimiter
}
}
-int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile*
profile) {
+int64_t WorkloadGroup::gc_memory(int64_t need_free_mem, RuntimeProfile*
profile, bool is_minor_gc) {
if (need_free_mem <= 0) {
return 0;
}
int64_t used_memory = memory_used();
int64_t freed_mem = 0;
- std::string cancel_str = fmt::format(
- "work load group memory exceeded limit, group id:{}, name:{},
used:{}, limit:{}, "
- "backend:{}.",
- _id, _name, MemTracker::print_bytes(used_memory),
- MemTracker::print_bytes(_memory_limit),
BackendOptions::get_localhost());
+ std::string cancel_str = "";
+ if (is_minor_gc) {
+ cancel_str = fmt::format(
+ "try cancel memory overcommit query in workload group when
MinorGC happens, group "
+ "id:{}, "
+ "name:{}, used:{}, limit:{}, "
+ "backend:{}.",
+ _id, _name, MemTracker::print_bytes(used_memory),
+ MemTracker::print_bytes(_memory_limit),
BackendOptions::get_localhost());
+ } else {
+ if (_enable_memory_overcommit) {
+ cancel_str = fmt::format(
Review Comment:
cancel_str = "workload group release overcommit memory when FullGC happens
which means sys "
"memory is not enough“
cancel_str += fmt::format(
"group id:{}, "
"name:{}, used:{}, limit:{}, "
"backend:{}.",
_id, _name, MemTracker::print_bytes(used_memory),
MemTracker::print_bytes(_memory_limit),
BackendOptions::get_localhost());
--
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]