xinyiZzz commented on code in PR #47462: URL: https://github.com/apache/doris/pull/47462#discussion_r2003004382
########## be/src/runtime/query_context.cpp: ########## @@ -146,34 +151,45 @@ QueryContext::QueryContext(TUniqueId query_id, ExecEnv* exec_env, void QueryContext::_init_query_mem_tracker() { bool has_query_mem_limit = _query_options.__isset.mem_limit && (_query_options.mem_limit > 0); - int64_t _bytes_limit = has_query_mem_limit ? _query_options.mem_limit : -1; - if (_bytes_limit > MemInfo::mem_limit()) { - VLOG_NOTICE << "Query memory limit " << PrettyPrinter::print(_bytes_limit, TUnit::BYTES) + int64_t bytes_limit = has_query_mem_limit ? _query_options.mem_limit : -1; + if (bytes_limit > MemInfo::mem_limit() || bytes_limit == -1) { + VLOG_NOTICE << "Query memory limit " << PrettyPrinter::print(bytes_limit, TUnit::BYTES) << " exceeds process memory limit of " << PrettyPrinter::print(MemInfo::mem_limit(), TUnit::BYTES) - << ". Using process memory limit instead"; - _bytes_limit = MemInfo::mem_limit(); + << " OR is -1. Using process memory limit instead."; + bytes_limit = MemInfo::mem_limit(); + } + // If the query is a pure load task(streamload, routine load, group commit), then it should not use + // memlimit per query to limit their memory usage. + if (is_pure_load_task()) { Review Comment: 不需要支持限制单个load的memtable -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org