Copilot commented on code in PR #67466:
URL: https://github.com/apache/doris/pull/67466#discussion_r3920972361


##########
be/src/storage/compaction/compaction.cpp:
##########
@@ -2137,15 +2149,16 @@ bool 
CloudCompactionMixin::should_apply_cumulative_compaction_result(
     return true;
 }
 
-Status CloudCompactionMixin::execute_compact_impl(int64_t permits) {
-    OlapStopWatch watch;
-
+Status CloudCompactionMixin::prepare_execute_compact(int64_t permits) {
     RETURN_IF_ERROR(build_basic_info());
 
     LOG(INFO) << "start " << compaction_name() << ". tablet=" << 
_tablet->tablet_id()
               << ", output_version=" << _output_version << ", permits: " << 
permits;
+    return Status::OK();
+}
 
-    RETURN_IF_ERROR(merge_input_rowsets());
+Status CloudCompactionMixin::finish_execute_compact(int64_t 
execution_start_time_us) {
+    DORIS_CHECK_GT(execution_start_time_us, 0);
 

Review Comment:
   `MonotonicMicros()` (CLOCK_MONOTONIC) can legally return 0 very early after 
boot; asserting `execution_start_time_us > 0` could crash even though the 
timestamp is valid. If you want to keep this as an invariant check, it should 
allow 0 (or be removed).



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

Reply via email to