chaoyli commented on a change in pull request #3339: [tablet] A small refactor
on class Tablet
URL: https://github.com/apache/incubator-doris/pull/3339#discussion_r409985554
##########
File path: be/src/olap/rowset_graph.cpp
##########
@@ -237,25 +232,26 @@ OLAPStatus
RowsetGraph::capture_consistent_versions(const Version& spec_version,
reversed_path.push_back(tmp_vertex_index);
}
- // Make version_path from reversed_path.
- std::stringstream shortest_path_for_debug;
- for (size_t path_id = reversed_path.size() - 1; path_id > 0; --path_id) {
- int64_t tmp_start_vertex_value =
_version_graph[reversed_path[path_id]].value;
- int64_t tmp_end_vertex_value = _version_graph[reversed_path[path_id -
1]].value;
-
- // tmp_start_vertex_value mustn't be equal to tmp_end_vertex_value
- if (tmp_start_vertex_value <= tmp_end_vertex_value) {
- version_path->emplace_back(tmp_start_vertex_value,
tmp_end_vertex_value - 1);
- } else {
- version_path->emplace_back(tmp_end_vertex_value,
tmp_start_vertex_value - 1);
- }
+ if (version_path != nullptr) {
Review comment:
I think should not coupling outside VersionPath empty logic in this function.
----------------------------------------------------------------
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]