HappenLee commented on a change in pull request #3383:
URL: https://github.com/apache/incubator-doris/pull/3383#discussion_r414258601



##########
File path: be/src/runtime/runtime_state.cpp
##########
@@ -226,8 +226,12 @@ Status RuntimeState::init_mem_trackers(const TUniqueId& 
query_id) {
 
     // _query_mem_tracker = MemTracker::get_query_mem_tracker(
     //         query_id, bytes_limit, _exec_env->process_mem_tracker());
+
+    auto mem_tracker_counter = ADD_COUNTER(&_profile, "MemoryLimit", 
TUnit::BYTES);
+    mem_tracker_counter->set(bytes_limit);
+
     _query_mem_tracker.reset(
-            new MemTracker(bytes_limit, runtime_profile()->name(), 
_exec_env->process_mem_tracker()));
+            new MemTracker(&_profile, bytes_limit, runtime_profile()->name(), 
_exec_env->process_mem_tracker()));

Review comment:
       yes,I check code。the ```_instance_mem_tracker``` is more appropriate




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

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