yangzhg commented on a change in pull request #6236:
URL: https://github.com/apache/incubator-doris/pull/6236#discussion_r672764192



##########
File path: be/src/olap/tablet_meta.h
##########
@@ -285,6 +289,38 @@ inline void TabletMeta::set_cumulative_layer_point(int64_t 
new_point) {
     _cumulative_layer_point = new_point;
 }
 
+inline bool TabletMeta::contains_delete(const Version& version) const {
+    for (auto& rs : _rs_metas) {

Review comment:
       no need to order by version, if contains delete version this tablet will 
not split by segmnent

##########
File path: be/src/olap/tablet.cpp
##########
@@ -675,6 +676,62 @@ OLAPStatus Tablet::capture_rs_readers(const 
std::vector<Version>& version_path,
     return OLAP_SUCCESS;
 }
 
+OLAPStatus Tablet::capture_rs_readers_by_range(const Version& spec_version,
+                                               vector<RowsetReaderSharedPtr>* 
rs_readers,
+                                               const 
std::vector<OlapScanRange*>& key_ranges,
+                                               std::shared_ptr<MemTracker> 
parent_tracker) {
+    std::set<RowsetId> rowsets;
+    bool has_segment_range = false;
+    for (auto key_range : key_ranges) {
+        if (key_range->range_type == ScanRangeType::SEGMENT) {
+            for (const auto& s : key_range->segments) {
+                rowsets.emplace(s.first);
+            }
+            has_segment_range = true;
+        }
+    }
+    if (!has_segment_range) {

Review comment:
       if key_ranges  have SEGMENT key range, it will have KEY key range




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