chaoyli commented on a change in pull request #1976: And multi-path in
RowsetGraph
URL: https://github.com/apache/incubator-doris/pull/1976#discussion_r334760984
##########
File path: be/src/olap/tablet.cpp
##########
@@ -784,30 +623,25 @@ OLAPStatus Tablet::calculate_cumulative_point() {
if (_cumulative_point != -1) {
return OLAP_SUCCESS;
}
-
- std::list<Version> existing_versions;
- for (auto& rs : _tablet_meta->all_rs_metas()) {
- existing_versions.emplace_back(rs->version());
- }
+ std::vector<Version> version_path;
+ Version maximum_version = max_version();
+ LOG(INFO) << "maximum_version:" << maximum_version.first
+ << "-" << maximum_version.second;
+ RETURN_NOT_OK(_rs_graph.capture_consistent_versions(Version(0,
maximum_version.second), &version_path));
+ std::sort(version_path.begin(), version_path.end(),
+ [](const Version& a, const Version& b) {return a.first <
b.first;}
+ );
- // sort the existing versions in ascending order
- existing_versions.sort([](const Version& a, const Version& b) {
- // simple because 2 versions are certainly not overlapping
- return a.first < b.first;
- });
-
- int64_t prev_version = -1;
- for (const Version& version : existing_versions) {
- if (version.first > prev_version + 1) {
- break;
- }
+ for (auto& version : version_path) {
+ LOG(INFO) << "version:" << version.first << "-" << version.second;
Review comment:
I have to know what versions have been missed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]