yiguolei commented on code in PR #28149: URL: https://github.com/apache/doris/pull/28149#discussion_r1420185314
########## be/src/olap/tablet_manager.cpp: ########## @@ -236,10 +234,12 @@ Status TabletManager::_add_tablet_to_map_unlocked(TTabletId tablet_id, tablet_map_t& tablet_map = _get_tablet_map(tablet_id); tablet_map[tablet_id] = tablet; _add_tablet_to_partition(tablet); + // TODO: memory size of TabletSchema cannot be accurately tracked. // TODO: remove multiply 2 of tablet meta mem size // Because table schema will copy in tablet, there will be double mem cost // so here multiply 2 - _tablet_meta_mem_tracker->consume(tablet->tablet_meta()->mem_size() * 2); + // _tablet_meta_schema_columns_tracker->consume(tablet->tablet_meta()->mem_size() * 2); + _tablet_meta_schema_columns_tracker->consume(tablet->tablet_meta()->tablet_columns_num()); Review Comment: 这既然不是一个memtracker, 就不要用memtracker 来统计个数了,后面会翻车。 如果他只是一个counter,那么就用类似bvar或者doris metric 这种方式直接作为监控项来统计。 ########## be/src/olap/tablet_manager.cpp: ########## @@ -236,10 +234,12 @@ Status TabletManager::_add_tablet_to_map_unlocked(TTabletId tablet_id, tablet_map_t& tablet_map = _get_tablet_map(tablet_id); tablet_map[tablet_id] = tablet; _add_tablet_to_partition(tablet); + // TODO: memory size of TabletSchema cannot be accurately tracked. // TODO: remove multiply 2 of tablet meta mem size // Because table schema will copy in tablet, there will be double mem cost // so here multiply 2 - _tablet_meta_mem_tracker->consume(tablet->tablet_meta()->mem_size() * 2); + // _tablet_meta_schema_columns_tracker->consume(tablet->tablet_meta()->mem_size() * 2); + _tablet_meta_schema_columns_tracker->consume(tablet->tablet_meta()->tablet_columns_num()); Review Comment: 这既然不是一个memtracker, 就不要用memtracker 来统计个数了,后面会翻车。 如果他只是一个counter,那么就用类似bvar或者doris metric 这种方式直接作为监控项来统计。 -- 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