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/02 11:46:30 UTC

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

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



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

Review comment:
       get mem usage may an expensive call




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