You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/04/06 08:50:19 UTC
[GitHub] [incubator-doris] xinyiZzz commented on a diff in pull request #8669: [feature-wip] (memory) Switch TLS mem tracker to separate more detailed memory usage (Part2)
xinyiZzz commented on code in PR #8669:
URL: https://github.com/apache/incubator-doris/pull/8669#discussion_r843677980
##########
be/src/runtime/thread_mem_tracker_mgr.h:
##########
@@ -217,14 +217,14 @@ inline void ThreadMemTrackerMgr::cache_consume(int64_t size) {
if (_untracked_mem >= config::mem_tracker_consume_min_size_bytes ||
_untracked_mem <= -config::mem_tracker_consume_min_size_bytes) {
DCHECK(_untracked_mems.find(_tracker_id) != _untracked_mems.end());
+ start_thread_mem_tracker = false;
Review Comment:
Avoid getting into infinite recursion if there is a temporary memory allocation in mem_tracker.consume/try_consume.
It is mentioned in the comments of `tcmalloc_hook.h`: Allocating memory in the Hook command causes the Hook to be entered again, infinite recursion.
This needs to ensure that all memory allocated in mem_tracker.consume/try_consume is freed in time to avoid tracking misses.
Add comments when modifying uniformly.
--
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-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org