gavinchou commented on code in PR #48786:
URL: https://github.com/apache/doris/pull/48786#discussion_r1983904725
##########
be/src/olap/rowset/segment_v2/segment.cpp:
##########
@@ -520,21 +511,20 @@ Status Segment::load_index(OlapReaderStatistics* stats) {
// read and parse short key index page
OlapReaderStatistics tmp_stats;
OlapReaderStatistics* stats_ptr = stats != nullptr ? stats :
&tmp_stats;
- PageReadOptions opts {
- .use_page_cache = true,
- .type = INDEX_PAGE,
- .file_reader = _file_reader.get(),
- .page_pointer = PagePointer(_sk_index_page),
- // short key index page uses NO_COMPRESSION for now
- .codec = nullptr,
- .stats = &tmp_stats,
- .io_ctx = io::IOContext {.is_index_data = true,
- .file_cache_stats =
&stats_ptr->file_cache_stats},
- };
+ PageReadOptions opts(io::IOContext {.is_index_data = true,
+ .file_cache_stats =
&stats_ptr->file_cache_stats});
+ opts.use_page_cache = true;
+ opts.type = INDEX_PAGE;
+ opts.file_reader = _file_reader.get();
+ opts.page_pointer = PagePointer(_sk_index_page);
+ // short key index page uses NO_COMPRESSION for now
+ opts.codec = nullptr;
+ opts.stats = &tmp_stats;
+
Slice body;
PageFooterPB footer;
- RETURN_IF_ERROR(
- PageIO::read_and_decompress_page(opts, &_sk_index_handle,
&body, &footer));
+
RETURN_IF_ERROR(PageIO::read_and_decompress_page_with_file_cache_retry(
Review Comment:
it's better that we expand
`read_and_decompress_page_with_file_cache_retry()` in segment.cpp
instead of hacking page_io.h/cpp.
the low level IO should not notice "file cache".
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]