jackwener commented on a change in pull request #8673:
URL: https://github.com/apache/incubator-doris/pull/8673#discussion_r835737718
##########
File path: be/src/olap/version_graph.cpp
##########
@@ -57,7 +57,7 @@ void TimestampedVersionTracker::construct_versioned_tracker(
_next_path_id = 1;
_construct_versioned_tracker(rs_metas);
- // init _stale_version_path_map
+ // Init '_stale_version_path_map'.
Review comment:
```suggestion
// Init `_stale_version_path_map`.
```
Use ` would be better.
We can see `Function Comments` in `google cpp style`.
[here](https://google.github.io/styleguide/cppguide.html#Comment_Style)
##########
File path: be/src/olap/version_graph.cpp
##########
@@ -68,15 +68,15 @@ void
TimestampedVersionTracker::_init_stale_version_path_map(
return;
}
- // sort stale meta by version diff (second version - first version)
+ // Sort stale meta by version diff (second version - first version).
std::list<RowsetMetaSharedPtr> sorted_stale_metas;
for (auto& rs : stale_metas) {
sorted_stale_metas.emplace_back(rs);
}
- // 1. Sort the existing rowsets by version in ascending order
+ // 1. sort the existing rowsets by version in ascending order.
sorted_stale_metas.sort([](const RowsetMetaSharedPtr& a, const
RowsetMetaSharedPtr& b) {
- // compare by version diff between version.first and version.second
+ // Compare by version diff between 'version.first' and
'version.second'.
Review comment:
ditto
##########
File path: be/src/olap/version_graph.cpp
##########
@@ -98,19 +98,19 @@ void
TimestampedVersionTracker::_init_stale_version_path_map(
// and add the path to _stale_version_path_map.
for (auto& stale_meta : sorted_stale_metas) {
std::vector<RowsetMetaSharedPtr> stale_path;
- // 2.1 find a path in stale_map can replace current stale_meta version
+ // 2.1 find a path in stale_map can replace current stale_meta version.
bool r = _find_path_from_stale_map(stale_map,
stale_meta->start_version(),
stale_meta->end_version(),
&stale_path);
- // 2.2 add version to version_graph
+ // 2.2 add version to version_graph.
Version stale_meta_version = stale_meta->version();
add_version(stale_meta_version);
- // 2.3 find the path
+ // 2.3 find the path.
if (r) {
- // add the path to _stale_version_path_map
+ // Add the path to '_stale_version_path_map'.
add_stale_path_version(stale_path);
- // remove stale_path from stale_map
+ // Remove 'stale_path' from 'stale_map'.
Review comment:
ditto, and following I won't list.
--
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]