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


##########
regression-test/suites/query_profile/scanner_profile.groovy:
##########
@@ -19,94 +19,77 @@ import groovy.json.JsonOutput
 import groovy.json.JsonSlurper
 import groovy.json.StringEscapeUtils
 import org.apache.doris.regression.action.ProfileAction
-import org.awaitility.Awaitility
-import static java.util.concurrent.TimeUnit.SECONDS
 
-suite('scanner_profile') {
-    sql """
-        DROP TABLE IF EXISTS scanner_profile;
-    """
-    sql """
-        CREATE TABLE if not exists `scanner_profile` (
-            `id` INT,
-            `name` varchar(32)
-        ) ENGINE=OLAP
-        DISTRIBUTED BY HASH(`id`) BUCKETS 10
-        PROPERTIES (
-            "replication_allocation" = "tag.location.default: 1"
-        );
-    """
+suite('scanner_profile', 'nonConcurrent') {
+    setFeConfigTemporary(["profile_waiting_time_for_spill_seconds": 60]) {
+        sql """
+            DROP TABLE IF EXISTS scanner_profile;
+        """
+        sql """
+            CREATE TABLE if not exists `scanner_profile` (
+                `id` INT,
+                `name` varchar(32)
+            ) ENGINE=OLAP
+            DISTRIBUTED BY HASH(`id`) BUCKETS 10
+            PROPERTIES (
+                "replication_allocation" = "tag.location.default: 1"
+            );
+        """
 
-    // Insert data to table
-    sql """
-        insert into scanner_profile values 
-        (1, "A"),(2, "B"),(3, "C"),(4, 
"D"),(5,"E"),(6,"F"),(7,"G"),(8,"H"),(9,"K");
-    """
-    sql """
-        insert into scanner_profile values 
-        (10, "A"),(20, "B"),(30, "C"),(40, 
"D"),(50,"E"),(60,"F"),(70,"G"),(80,"H"),(90,"K");
-    """
-    sql """
-        insert into scanner_profile values 
-        (101, "A"),(201, "B"),(301, "C"),(401, 
"D"),(501,"E"),(601,"F"),(701,"G"),(801,"H"),(901,"K");
-    """
-    sql """
-        insert into scanner_profile values 
-        (1010, "A"),(2010, "B"),(3010, "C"),(4010, 
"D"),(5010,"E"),(6010,"F"),(7010,"G"),(8010,"H"),(9010,"K");
-    """
+        // Insert data to table
+        sql """
+            insert into scanner_profile values
+            (1, "A"),(2, "B"),(3, "C"),(4, 
"D"),(5,"E"),(6,"F"),(7,"G"),(8,"H"),(9,"K");
+        """
+        sql """
+            insert into scanner_profile values
+            (10, "A"),(20, "B"),(30, "C"),(40, 
"D"),(50,"E"),(60,"F"),(70,"G"),(80,"H"),(90,"K");
+        """
+        sql """
+            insert into scanner_profile values
+            (101, "A"),(201, "B"),(301, "C"),(401, 
"D"),(501,"E"),(601,"F"),(701,"G"),(801,"H"),(901,"K");
+        """
+        sql """
+            insert into scanner_profile values
+            (1010, "A"),(2010, "B"),(3010, "C"),(4010, 
"D"),(5010,"E"),(6010,"F"),(7010,"G"),(8010,"H"),(9010,"K");
+        """
 
-    sql "set enable_profile=true"
-    sql "set profile_level=2;"
-    
-    def token = UUID.randomUUID().toString()
+        sql "set enable_profile=true"
+        sql "set profile_level=2;"
 
-    sql """
-        select "${token}", * from scanner_profile limit 10;
-    """
-    def profileAction = new ProfileAction(context)
-    def getProfileByToken = { pattern ->
-        List profileData = profileAction.getProfileList()
-        def profileContent = ""
-        for (final def profileItem in profileData) {
-            if (profileItem["Sql Statement"].toString().contains(pattern)) {
-                profileContent = profileAction.getProfile(profileItem["Profile 
ID"].toString())
-                break
-            }
-        }
-        return profileContent        
-    }
+        def token = UUID.randomUUID().toString()
 
-    // The BE reports the detailed execution profile to FE asynchronously, 
after
-    // the query result has already been returned to the client. Fetching too
-    // early yields a profile whose MergedProfile carries no operators, so the
-    // scanner counters and the backfilled actualRows are not present yet. Poll
-    // until the scan operator shows up, i.e. the execution profile has landed.
-    def getCompleteProfileByToken = { pattern ->
-        String content = ""
-        Awaitility.await().atMost(60, SECONDS).pollInterval(1, SECONDS).until {
-            content = getProfileByToken(pattern).toString()
-            return content.contains("OLAP_SCAN_OPERATOR")
+        sql """
+            select "${token}", * from scanner_profile limit 10;
+        """
+        def profileAction = new ProfileAction(context)
+        def getProfileByToken = { pattern, requiredContents ->
+            return profileAction.getProfileBySql(pattern, requiredContents)

Review Comment:
   This drops the scanner-profile polling window back to 30s. The old 
Awaitility loop waited up to 60 seconds for the async BE profile report before 
checking the scanner counters, and this suite now also sets 
`profile_waiting_time_for_spill_seconds` to 60. Since this call uses 
`getProfileBySql` without timeout arguments, it falls back to 
`DEFAULT_PROFILE_WAIT_TIMEOUT_MS = 30000`, so the test can still fail at 30s 
even though FE is configured to keep waiting and the profile could become 
complete before the previous 60s window. Please pass the same 60s timeout here 
that the adaptive-profile suite uses.



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