xinyiZzz commented on a change in pull request #8476: URL: https://github.com/apache/incubator-doris/pull/8476#discussion_r829013533
########## File path: be/src/exec/tablet_info.cpp ########## @@ -416,7 +416,7 @@ VOlapTablePartitionParam::VOlapTablePartitionParam(std::shared_ptr<OlapTableSche : _schema(schema), _t_param(t_param), _slots(_schema->tuple_desc()->slots()), - _mem_tracker(MemTracker::create_tracker(-1, "OlapTablePartitionParam")) { + _mem_tracker(MemTracker::create_virtual_tracker(-1, "OlapTablePartitionParam")) { Review comment: Because this tracker needs to manually consume/release The difference between virutal tracker and non-virutal tracker: - non-virutal tracker In order to ensure the absolute accuracy of non-virutal mem tracker tree statistics, there are only two ways to count: one is to modify the tls mem tracker through attach or switch, and count in the tcmalloc new/delete hook; the other is to transfer memory ownership between non-virutal trackers. - virutal tracker Manual consume/release as before, the reasons for designing the virutal tracker: First, to transfer memory ownership between two trackers, it will release first and then consume, which is slower than calling consume/release directly on the virutal tracker; second, through parameters After blocking the virutal tracker, it will prevent the mem tracker tree from becoming more messy, and it is safer to add or delete the virutal tracker. The non-virutal tracker is similar to the INFO log level, and the virutal tracker is similar to the DEBUG log level. -- 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