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


##########
regression-test/suites/compaction/test_mow_compact_multi_segments.groovy:
##########
@@ -186,25 +197,19 @@ suite("test_mow_compact_multi_segments", "nonConcurrent") 
{
     sql "sync"
     def rowCount1 = sql """ select count() from ${tableName}; """
     logger.info("rowCount1: ${rowCount1}")
-    // check generate 3 segments
-    getTabletStatus(tablet, 2, 3)
+    // check generate multiple segments
+    assertTrue(getTabletSegmentNum(tablet, 2) > 1)
 
     // trigger compaction
-    
GetDebugPoint().enableDebugPointForAllBEs("CloudSizeBasedCumulativeCompactionPolicy::pick_input_rowsets.set_input_rowsets",
+    GetDebugPoint().enableDebugPointForAllBEs(pickInputRowsetsDebugPoint,
             [tablet_id: "${tablet.TabletId}", start_version: 2, end_version: 
2])
     def (code, out, err) = 
be_run_cumulative_compaction(backendId_to_backendIP.get(backend_id), 
backendId_to_backendHttpPort.get(backend_id), tablet_id)
     logger.info("Run compaction: code=" + code + ", out=" + out + ", err=" + 
err)
     assertEquals(code, 0)
     def compactJson = parseJson(out.trim())
     logger.info("compact json: " + compactJson)
-    // check generate 1 segments
-    for (int i = 0; i < 20; i++) {
-        if (getTabletStatus(tablet, 2, 1, false)) {
-            break
-        }
-        sleep(100)
-    }
-    getTabletStatus(tablet, 2, 1)
+    // check generate 1 segment
+    waitForTabletSegmentNum(tablet, 2, 1)

Review Comment:
   [P2] Wait for the first compaction before asserting its output
   
   In cloud mode `/api/compaction/run` returns after putting the prepared task 
on the compaction thread pool, and the local handler can likewise return once 
its own two-second wait expires. This first check then hard-fails after only 
the helper's roughly two-second polling window, so a healthy queued/slow 
compaction leaves rowset 2 multi-segment and makes the cross-mode regression 
flaky. The second trigger already calls `waitForCompaction(tablet)` before 
checking its segment count; please add the same completion-aware wait here (or 
use a realistic completion-aware deadline) before enforcing the one-segment 
result.



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