zhannngchen commented on code in PR #34871: URL: https://github.com/apache/doris/pull/34871#discussion_r1604265672
########## be/src/olap/base_tablet.cpp: ########## @@ -548,6 +553,15 @@ Status BaseTablet::lookup_row_key(const Slice& encoded_key, bool with_seq_col, for (auto id : picked_segments) { Status s = segments[id]->lookup_row_key(encoded_key, with_seq_col, with_rowid, &loc); + SegmentCache::CacheKey cache_key(rs->rowset_id(), segments[id]->id()); + auto cache_value = std::make_unique<SegmentCache::CacheValue>(); + cache_value->segment = segments[id]; + try { + SegmentLoader::instance()->update_segment(cache_key, *cache_value); Review Comment: The real implementation of `load_pk_index_and_bf` only would be called once, but `lookup_row_key` might be called for billions of times, if you also call `update_segment` for so many times ,the LRU write lock would become bottleneck. -- 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