github-actions[bot] commented on code in PR #45619:
URL: https://github.com/apache/doris/pull/45619#discussion_r1891071220


##########
be/src/olap/rowset/segment_v2/inverted_index_file_reader.cpp:
##########
@@ -27,21 +27,27 @@
 
 namespace doris::segment_v2 {
 
-Status InvertedIndexFileReader::init(int32_t read_buffer_size) {
+Status InvertedIndexFileReader::init(int32_t read_buffer_size, const 
io::IOContext* io_ctx) {
     if (!_inited) {
         _read_buffer_size = read_buffer_size;
-        if (_storage_format == InvertedIndexStorageFormatPB::V2) {
-            auto st = _init_from_v2(read_buffer_size);
+        if (_storage_format >= InvertedIndexStorageFormatPB::V2) {
+            auto st = _init_from(read_buffer_size, io_ctx);
             if (!st.ok()) {
                 return st;
             }
         }
         _inited = true;
+    } else {
+        if (_storage_format == InvertedIndexStorageFormatPB::V2) {
+            if (_stream) {
+                _stream->setIoContext(io_ctx);
+            }
+        }
     }
     return Status::OK();
 }
 
-Status InvertedIndexFileReader::_init_from_v2(int32_t read_buffer_size) {
+Status InvertedIndexFileReader::_init_from(int32_t read_buffer_size, const 
io::IOContext* io_ctx) {

Review Comment:
   warning: function '_init_from' exceeds recommended size/complexity 
thresholds [readability-function-size]
   ```cpp
   Status InvertedIndexFileReader::_init_from(int32_t read_buffer_size, const 
io::IOContext* io_ctx) {
                                   ^
   ```
   <details>
   <summary>Additional context</summary>
   
   **be/src/olap/rowset/segment_v2/inverted_index_file_reader.cpp:49:** 94 
lines including whitespace and comments (threshold 80)
   ```cpp
   Status InvertedIndexFileReader::_init_from(int32_t read_buffer_size, const 
io::IOContext* io_ctx) {
                                   ^
   ```
   
   </details>
   



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