xinyiZzz commented on code in PR #9145:
URL: https://github.com/apache/incubator-doris/pull/9145#discussion_r857227191


##########
be/src/runtime/thread_mem_tracker_mgr.h:
##########
@@ -127,17 +107,32 @@ class ThreadMemTrackerMgr {
     // must increase the control to avoid entering infinite recursion, 
otherwise it may cause crash or stuck,
     void cache_consume(int64_t size);
 
-    void noncache_consume();
+    void noncache_consume(int64_t size);
 
     bool is_attach_task() { return _task_id != ""; }
 
-    std::shared_ptr<MemTracker> mem_tracker() {
-        DCHECK(_mem_trackers[_tracker_id]) << ", label: " << 
_mem_tracker_labels[_tracker_id];
-        if (_mem_trackers[_tracker_id]) {
-            return _mem_trackers[_tracker_id];
-        } else {
-            return MemTracker::get_process_tracker();
+    std::shared_ptr<MemTracker> mem_tracker();
+
+    int64_t switch_count = 0;
+
+    std::string print_debug_string() {
+        std::stringstream mem_trackers_str;

Review Comment:
   fmt doesn't seem to support an indeterminate number of string concatenations.
   
   I changed to `string +=`, which seems to be faster than `stringstream`. 
`StringBuilder` seems to be a better solution, but not necessary here = =



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to