github-actions[bot] commented on code in PR #65373:
URL: https://github.com/apache/doris/pull/65373#discussion_r3556332028


##########
regression-test/plugins/plugin_compaction.groovy:
##########
@@ -177,9 +201,30 @@ Suite.metaClass.trigger_and_wait_compaction = { String 
table_name, String compac
                 }
                 def success_time_unchanged = (oldStatus["last 
${compaction_type} success time"] == tabletStatus["last ${compaction_type} 
success time"])
                 def failure_time_unchanged = (oldStatus["last 
${compaction_type} failure time"] == tabletStatus["last ${compaction_type} 
failure time"])
-                def currentCompactionTimestampChanged = 
!success_time_unchanged || !failure_time_unchanged
+                def status_unchanged = (oldStatus["last ${compaction_type} 
status"] == tabletStatus["last ${compaction_type} status"])
+                def compactionFailureNonFatal = !failure_time_unchanged &&
+                        ((!status_unchanged &&
+                                isNoopCompactionStatus(compaction_type, 
tabletStatus["last ${compaction_type} status"])) ||
+                                isIgnoredCompactionStatus(tabletStatus["last 
${compaction_type} status"]))
+                def baseFailureTimeChanged = 
handedOffToBaseCompactionAfterDeleteVersion &&
+                        oldStatus["last base failure time"] != 
tabletStatus["last base failure time"]
+                def baseFailureIgnored = baseFailureTimeChanged && 
isIgnoredCompactionStatus(tabletStatus["last base status"])
+                if (!running && !handedOffToBaseCompactionAfterDeleteVersion &&
+                        !completedByBaseCompactionAfterDeleteVersion &&
+                        success_time_unchanged && !failure_time_unchanged && 
!compactionFailureNonFatal) {
+                    throw new Exception("compaction failed, be host: 
${be_host}, tablet id: ${tablet.TabletId}, " +
+                            "run status: ${compactionStatus.run_status}, old 
status: ${oldStatus}, new status: ${tabletStatus}")
+                }
+                if (!running && handedOffToBaseCompactionAfterDeleteVersion &&
+                        !completedByBaseCompactionAfterDeleteVersion &&
+                        baseFailureTimeChanged && !baseFailureIgnored) {
+                    throw new Exception("base compaction failed after 
cumulative E-2010 handoff, be host: ${be_host}, " +
+                            "tablet id: ${tablet.TabletId}, run status: 
${compactionStatus.run_status}, " +
+                            "old status: ${oldStatus}, new status: 
${tabletStatus}")
+                }
                 def compactionFinished = 
completedByBaseCompactionAfterDeleteVersion ||
-                        (!handedOffToBaseCompactionAfterDeleteVersion && 
currentCompactionTimestampChanged)
+                        compactionFailureNonFatal || baseFailureIgnored ||
+                        (!handedOffToBaseCompactionAfterDeleteVersion && 
!success_time_unchanged)

Review Comment:
   The failure checks added above are still skipped for time-series tables. 
When `compaction_policy = "time_series"`, the helper goes into the 
run-status-only branch below, so a cumulative compaction that fails after the 
manual endpoint's two-second wait just makes `/run_status` become false and the 
helper returns without checking `last cumulative failure time` or `last 
cumulative status`. The BE time-series special case only skips updating the 
success timestamp for empty-output successes; 
`CumulativeCompaction::execute_compact()` still records status and failure time 
on `!st.ok()`. Please keep the success-time relaxation for time-series 
compaction, but still compare the fresh failure timestamp/status before 
accepting the run-status-only completion.



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