yiguolei commented on code in PR #41282: URL: https://github.com/apache/doris/pull/41282#discussion_r1774882388
########## be/src/runtime/memory/mem_tracker_limiter.h: ########## @@ -171,6 +171,18 @@ class MemTrackerLimiter final { int64_t reserved_consumption() const { return _reserved_counter.current_value(); } int64_t reserved_peak_consumption() const { return _reserved_counter.peak_value(); } + void reserve(int64_t bytes) { + if (UNLIKELY(bytes == 0)) { + return; + } + _mem_counter.add(bytes); + if (_query_statistics) { + _query_statistics->set_max_peak_memory_bytes(peak_consumption()); + _query_statistics->set_current_used_memory_bytes(consumption()); + } + _reserved_counter.add(bytes); + } + bool try_reserve(int64_t bytes) { if (UNLIKELY(bytes == 0)) { return true; Review Comment: call reserve here -- 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