yiguolei commented on code in PR #44739: URL: https://github.com/apache/doris/pull/44739#discussion_r1862791809
########## be/src/olap/segment_loader.h: ########## @@ -75,9 +75,15 @@ class SegmentCache : public LRUCachePolicy { // Holding all opened segments of a rowset. class CacheValue : public LRUCacheValueBase { public: - ~CacheValue() override { segment.reset(); } + CacheValue(segment_v2::SegmentSharedPtr segment_) : segment(std::move(segment_)) { + // Transfer to segment cache memory tracker. + ExecEnv::GetInstance()->all_segments_mem_tracker()->release(segment->meta_mem_usage()); Review Comment: 这种逻辑改的太乱了,别这么改了,后面很难维护。 不如metadata adder 那里也像tablet meta 那种统计方式,把子对象累加起来就可以了。 然后cache 里继续使用meta_mem_usage 这个值。 -- 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