xinyiZzz commented on a change in pull request #7198:
URL: https://github.com/apache/incubator-doris/pull/7198#discussion_r755735814



##########
File path: be/src/runtime/mem_tracker.cpp
##########
@@ -242,26 +243,38 @@ int64_t MemTracker::GetPoolMemReserved() {
     return mem_reserved;
 }
 
-std::shared_ptr<MemTracker> PoolMemTrackerRegistry::GetRequestPoolMemTracker(
-        const string& pool_name, bool create_if_not_present) {
-    DCHECK(!pool_name.empty());
-    lock_guard<SpinLock> l(pool_to_mem_trackers_lock_);
-    PoolTrackersMap::iterator it = pool_to_mem_trackers_.find(pool_name);
-    if (it != pool_to_mem_trackers_.end()) {
-        MemTracker* tracker = it->second.get();
-        DCHECK(pool_name == tracker->pool_name_);
-        return it->second;
+std::shared_ptr<MemTracker> QueryMemTrackerRegistry::RegisterQueryMemTracker(
+        const std::string& query_id, int64_t mem_limit) {
+    DCHECK(!query_id.empty());
+    if (mem_limit != -1) {
+        if (mem_limit > MemInfo::physical_mem()) {

Review comment:
       Can check when memtracker is created, I try to change it




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