yiguolei commented on code in PR #44739:
URL: https://github.com/apache/doris/pull/44739#discussion_r1867008560


##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -174,6 +178,17 @@ int64_t Segment::get_metadata_size() const {
            (_pk_index_meta ? _pk_index_meta->ByteSizeLong() : 0);
 }
 
+void Segment::update_metadata_size() {

Review Comment:
   我感觉这个方法没必要重写,跟父类不一样的是188行。 
   可能你再segment 里增加一个新的函数,
   update_metadata_size()
   {
   MetaAdder::update_metadata_size();
   g_segment_estimate_mem_bytes << _meta_mem_usage - _tracked_meta_mem_usage;
       _tracked_meta_mem_usage = _meta_mem_usage;
   }
   
   这样metadataadder 
里的这个函数,就不需要是虚函数。因为他里面的逻辑非常trick,不应该被重写,如果要重写,也需要用户把原来他里面的代码copy 一次。



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