yiguolei commented on code in PR #35257:
URL: https://github.com/apache/doris/pull/35257#discussion_r1615458742


##########
be/src/runtime/memory/thread_mem_tracker_mgr.h:
##########
@@ -193,7 +198,8 @@ inline void ThreadMemTrackerMgr::consume(int64_t size, int 
skip_large_memory_che
             _reserved_mem -= size;
             // store bytes that not synchronized to process reserved memory.
             _untracked_mem += size;
-            if (_untracked_mem >= SYNC_PROC_RESERVED_INTERVAL_BYTES) {
+            // If _reserved_mem is added back, it still need synchronized to 
process reserved_memory.
+            if (std::abs(_untracked_mem) >= SYNC_PROC_RESERVED_INTERVAL_BYTES) 
{

Review Comment:
   add comment here to explain why this value will < 0



-- 
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

Reply via email to