imay commented on a change in pull request #4593:
URL: https://github.com/apache/incubator-doris/pull/4593#discussion_r504352883



##########
File path: be/src/olap/compaction.cpp
##########
@@ -181,6 +181,30 @@ OLAPStatus Compaction::gc_unused_rowsets() {
     return OLAP_SUCCESS;
 }
 
+// find the longest consecutive version path in "rowset", from begining.
+OLAPStatus 
Compaction::find_longest_consecutive_version(vector<RowsetSharedPtr>* rowsets) {
+    if (rowsets->empty()) {
+        return OLAP_SUCCESS;
+    }
+    RowsetSharedPtr prev_rowset = rowsets->front();
+    size_t i = 1;
+    for (; i < rowsets->size(); ++i) {
+        RowsetSharedPtr rowset = (*rowsets)[i];
+        if (rowset->start_version() != prev_rowset->end_version() + 1) {
+            LOG(WARNING) << "There are missed versions among rowsets. "

Review comment:
       Is it appropriate to print the warning log here?
   I think this function only deals with specific logic, and the caller can 
decide whether to print the log. This allows this function to be used in more 
scenarios.




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