xinyiZzz commented on code in PR #38168:
URL: https://github.com/apache/doris/pull/38168#discussion_r1686224993


##########
be/src/runtime/memory/thread_mem_tracker_mgr.h:
##########
@@ -291,6 +297,10 @@ inline bool ThreadMemTrackerMgr::try_reserve(int64_t size) 
{
         _limiter_tracker_raw->release(size); // rollback
         return false;
     }
+    auto wg_ptr = _wg_wptr.lock();
+    if (!wg_ptr) {
+        wg_ptr->add_wg_refresh_interval_memory_growth(size);

Review Comment:
   donw



##########
be/src/runtime/load_channel.cpp:
##########
@@ -46,13 +47,16 @@ LoadChannel::LoadChannel(const UniqueId& load_id, int64_t 
timeout_s, bool is_hig
             
ExecEnv::GetInstance()->fragment_mgr()->get_or_erase_query_ctx_with_lock(
                     _load_id.to_thrift());
     if (query_context != nullptr) {
-        _query_thread_context = {_load_id.to_thrift(), 
query_context->query_mem_tracker};
+        _query_thread_context = {_load_id.to_thrift(), 
query_context->query_mem_tracker,
+                                 query_context->workload_group()};
     } else {
         _query_thread_context = {
                 _load_id.to_thrift(),
                 MemTrackerLimiter::create_shared(
                         MemTrackerLimiter::Type::LOAD,
-                        fmt::format("(FromLoadChannel)Load#Id={}", 
_load_id.to_string()))};
+                        fmt::format("(FromLoadChannel)Load#Id={}", 
_load_id.to_string())),
+                
ExecEnv::GetInstance()->workload_group_mgr()->get_task_group_by_id(

Review Comment:
   donw



##########
be/src/runtime/load_channel.cpp:
##########
@@ -46,13 +47,16 @@ LoadChannel::LoadChannel(const UniqueId& load_id, int64_t 
timeout_s, bool is_hig
             
ExecEnv::GetInstance()->fragment_mgr()->get_or_erase_query_ctx_with_lock(
                     _load_id.to_thrift());
     if (query_context != nullptr) {
-        _query_thread_context = {_load_id.to_thrift(), 
query_context->query_mem_tracker};
+        _query_thread_context = {_load_id.to_thrift(), 
query_context->query_mem_tracker,
+                                 query_context->workload_group()};
     } else {
         _query_thread_context = {
                 _load_id.to_thrift(),
                 MemTrackerLimiter::create_shared(
                         MemTrackerLimiter::Type::LOAD,
-                        fmt::format("(FromLoadChannel)Load#Id={}", 
_load_id.to_string()))};
+                        fmt::format("(FromLoadChannel)Load#Id={}", 
_load_id.to_string())),
+                
ExecEnv::GetInstance()->workload_group_mgr()->get_task_group_by_id(

Review Comment:
   done



-- 
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-unsubscr...@doris.apache.org

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