wangbo commented on code in PR #17738:
URL: https://github.com/apache/doris/pull/17738#discussion_r1137041721


##########
be/src/olap/rowset/beta_rowset_reader.cpp:
##########
@@ -174,7 +179,15 @@ Status 
BetaRowsetReader::get_segment_iterators(RowsetReaderContext* read_context
                                                            should_use_cache));
 
     // create iterator for each segment
-    for (auto& seg_ptr : _segment_cache_handle.get_segments()) {
+    auto& segments = _segment_cache_handle.get_segments();
+    auto [seg_start, seg_end] = segment_offset;
+    if (seg_start == seg_end) {

Review Comment:
   Is there any possible that current rowset reader is allocated 
[seg_start=10,seg_end=10], then seg_start == seg_end, seg_start and seg_end is 
reset to [0, segments.size()]



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