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 2021/11/12 08:42:43 UTC

[GitHub] [incubator-doris] xinyiZzz commented on a change in pull request #6979: [Memory] Add a method to get doris current memory usage and Limt memoey usage when consume

xinyiZzz commented on a change in pull request #6979:
URL: https://github.com/apache/incubator-doris/pull/6979#discussion_r748069706



##########
File path: be/src/runtime/mem_tracker.h
##########
@@ -170,6 +173,12 @@ class MemTracker : public std::enable_shared_from_this<MemTracker> {
             Release(-bytes);
             return true;
         }
+        if (MemInfo::current_mem() + bytes >= MemInfo::mem_limit()) {
+            VLOG_NOTICE << "TryConsume failed, bytes=" << bytes
+                        << " process whole consumption=" << MemInfo::current_mem()
+                        << " mem limit=" << MemInfo::mem_limit();

Review comment:
       Can consider printing MemTacker through MemTracker::MemLimitExceeded
   P.S. Printing MemTracker::MemLimitExceeded has a certain cost, confirm that it will not be printed frequently.




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