xiaokang commented on code in PR #27678: URL: https://github.com/apache/doris/pull/27678#discussion_r1408834033
########## be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp: ########## @@ -263,7 +264,12 @@ bool DorisCompoundDirectory::FSIndexInput::open(const io::FileSystemSPtr& fs, co } SharedHandle* h = _CLNEW SharedHandle(path); - if (!fs->open_file(path, &h->_reader).ok()) { + io::FileDescription fd; + fd.path = path; + io::FileBlockCachePathPolicy cache_policy; + auto type = config::enable_file_cache ? config::file_cache_type : ""; + io::FileReaderOptions reader_options(io::cache_type_from_string(type), cache_policy); Review Comment: do not create reader_options for each read. ########## be/src/olap/rowset/segment_v2/inverted_index_compound_directory.cpp: ########## @@ -367,7 +373,9 @@ void DorisCompoundDirectory::FSIndexInput::readInternal(uint8_t* b, const int32_ Slice result {b, (size_t)len}; size_t bytes_read = 0; - if (!_handle->_reader->read_at(_pos, result, &bytes_read).ok()) { + io::IOContext io_ctx; Review Comment: do not create io_ctx for each read. -- 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