yangzhg commented on code in PR #9804:
URL: https://github.com/apache/incubator-doris/pull/9804#discussion_r893007504


##########
be/src/olap/compaction.cpp:
##########
@@ -55,6 +55,68 @@ Status Compaction::execute_compact() {
     return st;
 }
 
+Status Compaction::small_rowsets_compact() {
+    std::unique_lock<std::mutex> 
lock(_tablet->get_cumulative_compaction_lock(), std::try_to_lock);
+    if (!lock.owns_lock()) {
+        LOG(WARNING) << "The tablet is under cumulative compaction. tablet="
+                     << _tablet->full_name();
+        return Status::OLAPInternalError(OLAP_ERR_CE_TRY_CE_LOCK_ERROR);
+    }
+
+    // Clone task may happen after compaction task is submitted to thread 
pool, and rowsets picked
+    // for compaction may change. In this case, current compaction task should 
not be executed.
+    if (_tablet->get_clone_occurred()) {
+        _tablet->set_clone_occurred(false);
+        return Status::OLAPInternalError(OLAP_ERR_CUMULATIVE_CLONE_OCCURRED);
+    }
+
+    _input_rowsets.clear();
+    int version_count = _tablet->version_count();
+    int64_t now = UnixMillis();
+    int64_t permits = 0;
+    _tablet->pick_small_verson_rowsets(&_input_rowsets, &permits);
+    std::string input_ver = "";

Review Comment:
   use sstream, and Version has implement operator << 



-- 
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: commits-unsubscr...@doris.apache.org

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