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



##########
File path: be/src/exec/olap_scan_node.cpp
##########
@@ -1038,6 +1038,7 @@ Status 
OlapScanNode::normalize_binary_predicate(SlotDescriptor* slot, ColumnValu
 
 void OlapScanNode::transfer_thread(RuntimeState* state) {
     // scanner open pushdown to scanThread
+    state->resource_pool()->acquire_thread_token();

Review comment:
       Can you tell the side effect of this operation? Will this thread hang if 
there is not enough thread resource?

##########
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:
       If you add profile for this memory tracker, why not 
`_instance_mem_tracker`?




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