morningman commented on a change in pull request #6236:
URL: https://github.com/apache/incubator-doris/pull/6236#discussion_r683079735
##########
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) {
+ return capture_rs_readers(spec_version, rs_readers, parent_tracker);
+ }
+ std::vector<Version> version_path;
+ RETURN_NOT_OK(capture_consistent_versions(spec_version, &version_path));
+ return capture_rs_readers_by_rowsets(version_path, rs_readers, rowsets,
parent_tracker);
+}
+
+OLAPStatus Tablet::capture_rs_readers_by_rowsets(const std::vector<Version>&
version_path,
+
std::vector<RowsetReaderSharedPtr>* rs_readers,
+ const std::set<RowsetId>&
segments,
Review comment:
```suggestion
const std::set<RowsetId>&
rowset_ids,
```
--
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]