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


##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -48,9 +48,10 @@ Status Segment::open(io::FileSystem* fs, const std::string& 
path, uint32_t segme
 Segment::Segment(uint32_t segment_id, const TabletSchema* tablet_schema)
         : _segment_id(segment_id), _tablet_schema(*tablet_schema) {
 #ifndef BE_TEST
-    _mem_tracker = StorageEngine::instance()->tablet_mem_tracker();
+    _mem_tracker = MemTracker::create_virtual_tracker(
+            -1, "Segment", StorageEngine::instance()->tablet_mem_tracker());
 #else
-    _mem_tracker = MemTracker::get_process_tracker();

Review Comment:
   `process_tracker` should not be consumed by manual consume/release,
   Manual consumption in Segment should create a new virtual tracker
   (I'm refactoring mem tracker to avoid this)



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