[branch-2.1](memory) Modify memory gc conf and add crash_in_alloc_large_memory_bytes (#39834)
pick #39611
This commit is contained in:
@ -242,17 +242,29 @@ inline void ThreadMemTrackerMgr::consume(int64_t size, int skip_large_memory_che
|
||||
flush_untracked_mem();
|
||||
}
|
||||
|
||||
if (skip_large_memory_check == 0 && doris::config::stacktrace_in_alloc_large_memory_bytes > 0 &&
|
||||
size > doris::config::stacktrace_in_alloc_large_memory_bytes) {
|
||||
_stop_consume = true;
|
||||
LOG(WARNING) << fmt::format(
|
||||
"malloc or new large memory: {}, {}, this is just a warning, not prevent memory "
|
||||
"alloc, stacktrace:\n{}",
|
||||
size,
|
||||
is_attach_query() ? "in query or load: " + print_id(_query_id)
|
||||
: "not in query or load",
|
||||
get_stack_trace());
|
||||
_stop_consume = false;
|
||||
if (skip_large_memory_check == 0) {
|
||||
if (doris::config::stacktrace_in_alloc_large_memory_bytes > 0 &&
|
||||
size > doris::config::stacktrace_in_alloc_large_memory_bytes) {
|
||||
_stop_consume = true;
|
||||
LOG(WARNING) << fmt::format(
|
||||
"alloc large memory: {}, {}, this is just a warning, not prevent memory alloc, "
|
||||
"stacktrace:\n{}",
|
||||
size,
|
||||
is_attach_query() ? "in query or load: " + print_id(_query_id)
|
||||
: "not in query or load",
|
||||
get_stack_trace());
|
||||
_stop_consume = false;
|
||||
}
|
||||
if (doris::config::crash_in_alloc_large_memory_bytes > 0 &&
|
||||
size > doris::config::crash_in_alloc_large_memory_bytes) {
|
||||
LOG(FATAL) << fmt::format(
|
||||
"alloc large memory: {}, {}, crash generate core dumpsto help analyze, "
|
||||
"stacktrace:\n{}",
|
||||
size,
|
||||
is_attach_query() ? "in query or load: " + print_id(_query_id)
|
||||
: "not in query or load",
|
||||
get_stack_trace());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user