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


##########
be/src/runtime/memory/thread_mem_tracker_mgr.cpp:
##########
@@ -44,18 +44,26 @@ class AsyncCancelQueryTask : public Runnable {
 void ThreadMemTrackerMgr::attach_limiter_tracker(
         const std::shared_ptr<MemTrackerLimiter>& mem_tracker) {
     DCHECK(mem_tracker);
-    DCHECK(_reserved_mem == 0);
     CHECK(init());
     flush_untracked_mem();
+    _reserved_mem_stack.push_back(_reserved_mem);
+    if (_reserved_mem != 0) {
+        
doris::GlobalMemoryArbitrator::release_process_reserved_memory(_untracked_mem);

Review Comment:
   add comment here, why need release 



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