This is an automated email from the ASF dual-hosted git repository.

hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 9012d3bd6f3 [fix](regression) handle E-2010 compaction success wait 
(#65209)
9012d3bd6f3 is described below

commit 9012d3bd6f36f319aa0d7716f87cf5540b92bc0a
Author: shuke <[email protected]>
AuthorDate: Mon Jul 6 14:18:27 2026 +0800

    [fix](regression) handle E-2010 compaction success wait (#65209)
    
    Related PR: #64945
    
    Problem Summary:
    
    `trigger_and_wait_compaction` has special handling for cumulative
    compaction that meets delete-version rowsets and reports `E-2010`. PR
    #64945 made the helper wait for base compaction success before treating
    that handoff as finished.
    
    Build `985491` exposed another valid timing window in
    `compaction/test_compaction_agg_keys_with_delete.groovy`: for tablet
    `1783077858744`, base success was already visible in the cached old
    tablet status, while cumulative success advanced later.
    
    The final polled state was not stuck:
    
    - `run_status=false`
    - `cumulative point` advanced from `7` to `12`
    - `last cumulative status` changed to `[E-2010]cumulative compaction
    meet delete version`
    - `last cumulative success time` advanced from `2026-07-03 19:46:16.439`
    to `2026-07-03 19:46:16.945`
    - rowsets were compacted from separate `[8-8]`, `[9-9]`, `[10-10]`
    rowsets to `[8-10]`
    
    However, the helper only accepted the E-2010 handoff when `last base
    success time` changed after the cached old status. In this timing window
    that timestamp did not change, so the helper kept returning "still
    running" until the 5-minute Awaitility timeout.
    
    This patch keeps the previous safety guard: E-2010 plus cumulative point
    movement alone is still not enough. It now accepts the handoff when
    either base success time changes or cumulative success time changes, so
    a pure E-2010 failure timestamp change is not treated as completion.
---
 regression-test/plugins/plugin_compaction.groovy | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/regression-test/plugins/plugin_compaction.groovy 
b/regression-test/plugins/plugin_compaction.groovy
index d8ee5951222..67c16720204 100644
--- a/regression-test/plugins/plugin_compaction.groovy
+++ b/regression-test/plugins/plugin_compaction.groovy
@@ -163,12 +163,17 @@ Suite.metaClass.trigger_and_wait_compaction = { String 
table_name, String compac
                     def newCumulativePoint = 
toLongOrNull(tabletStatus["cumulative point"])
                     def lastCumulativeStatus = "${tabletStatus["last 
cumulative status"]}".toLowerCase()
                     def baseSuccessTimeChanged = oldStatus["last base success 
time"] != tabletStatus["last base success time"]
+                    def cumulativeSuccessTimeChanged =
+                            oldStatus["last cumulative success time"] != 
tabletStatus["last cumulative success time"]
                     // E-2010 advances the cumulative point and lets base 
compaction handle delete-version rowsets.
+                    // In some timing windows, base success is already visible 
in the cached old status while
+                    // cumulative success advances later, so accept either 
success signal but not failure time alone.
                     handedOffToBaseCompactionAfterDeleteVersion = 
lastCumulativeStatus.contains("e-2010") &&
                             oldCumulativePoint != null && newCumulativePoint 
!= null &&
                             newCumulativePoint > oldCumulativePoint
                     completedByBaseCompactionAfterDeleteVersion =
-                            handedOffToBaseCompactionAfterDeleteVersion && 
baseSuccessTimeChanged
+                            handedOffToBaseCompactionAfterDeleteVersion &&
+                            (baseSuccessTimeChanged || 
cumulativeSuccessTimeChanged)
                 }
                 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"])


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to