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


##########
regression-test/plugins/plugin_compaction.groovy:
##########
@@ -177,21 +201,56 @@ 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)
                 running = running || !compactionFinished
                 if (running) {
                     logger.info("compaction is still running, be host: 
${be_host}, tablet id: ${tablet.TabletId}, run status: 
${compactionStatus.run_status}, old status: ${oldStatus}, new status: 
${tabletStatus}")
                     return false
                 }
             } else {
                 // time series compaction sometimes doesn't update compaction 
success time
-                // so we solely check run_status for it
+                // so we use run_status as the success signal, but still 
surface recorded failures.

Review Comment:
   This time-series shortcut still bypasses the `E-2010` handoff verification 
added above. The trigger path now keeps an `E-2010` cumulative tablet in 
`triggered_tablets`, but for a table with `compaction_policy = "time_series"` 
this branch returns once `/run_status` is false and the cumulative failure 
timestamp is unchanged. Both local and cloud cumulative prepare paths can 
report `CUMULATIVE_MEET_DELETE_VERSION` after advancing the cumulative point 
without updating the failure timestamp, so the helper can accept the manual 
compaction before any base/cumulative success signal proves the delete-version 
rowsets were handled. Please run the same handoff detection before this 
run-status success shortcut, or keep waiting/fail on `E-2010` until a fresh 
base/cumulative success or base failure signal is visible.



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