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

suxiaogang223 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 a74e71188b3 [fix](test) Stabilize Paimon thread lifecycle check 
(#68784)
a74e71188b3 is described below

commit a74e71188b3061c1e151173c9b8da2a5d519f6af
Author: Socrates <[email protected]>
AuthorDate: Fri Oct 9 15:00:16 2026 +0800

    [fix](test) Stabilize Paimon thread lifecycle check (#68784)
    
    ### What problem does this PR solve?
    
    Issue Number: #65086
    
    Related PR: #68130
    
    Problem Summary: The Paimon thread lifecycle regression test required
    JVM and process thread counts to return to a fixed pre-phase baseline.
    Bounded native workers may enter the JVM after warm-up and cause a
    one-time increase without an actual leak. Keep the early-versus-late
    phase checks so persistent growth still fails while bounded worker-pool
    warm-up is accepted.
    
    ### Release note
    
    None
    
    ### Check List (For Author)
    
    - Test: Manual test
        - git diff --check
    - Behavior changed: No
    - Does this need documentation: No
---
 .../test_paimon_write_thread_lifecycle.groovy      | 22 ++++++----------------
 1 file changed, 6 insertions(+), 16 deletions(-)

diff --git 
a/regression-test/suites/external_table_p0/paimon/write/test_paimon_write_thread_lifecycle.groovy
 
b/regression-test/suites/external_table_p0/paimon/write/test_paimon_write_thread_lifecycle.groovy
index e5f34149a76..420f53cd18b 100644
--- 
a/regression-test/suites/external_table_p0/paimon/write/test_paimon_write_thread_lifecycle.groovy
+++ 
b/regression-test/suites/external_table_p0/paimon/write/test_paimon_write_thread_lifecycle.groovy
@@ -95,8 +95,9 @@ suite("test_paimon_write_thread_lifecycle", 
"p0,external,paimon,nonConcurrent")
     sql """use ${dbName}"""
 
     try {
-        // Warm all writer and metrics paths before taking the baseline. This 
keeps
-        // one-time JVM attachment and SDK class initialization out of the 
leak oracle.
+        // Warm common writer and metrics paths before measuring 
phase-to-phase growth. The
+        // blocking scheduler may still assign later writes to native workers 
that have not entered
+        // the JVM yet, so a bounded one-time increase after warm-up is not 
evidence of a leak.
         for (int round = 0; round < 12; round++) {
             sql """
                 INSERT INTO t_thread_lifecycle
@@ -106,10 +107,6 @@ suite("test_paimon_write_thread_lifecycle", 
"p0,external,paimon,nonConcurrent")
         }
         sleep(3000)
 
-        def jvmBefore = minimumThreadCounts(jvmThreadCounts)
-        def processBefore = minimumThreadCounts(processThreadCounts)
-        logger.info("Paimon thread baseline: jvm=${jvmBefore}, 
process=${processBefore}")
-
         def writePhase = { int firstRound ->
             for (int round = firstRound; round < firstRound + 12; round++) {
                 sql """
@@ -135,10 +132,9 @@ suite("test_paimon_write_thread_lifecycle", 
"p0,external,paimon,nonConcurrent")
                 (sql """SELECT COUNT(*) FROM t_thread_lifecycle""")[0][0] as 
long)
 
         backendEndpoints.keySet().each { backendId ->
-            // Warm-up performs the same workload as every measured phase. 
Judge persistent growth
-            // from the actual pre-phase baseline and phase low-water marks 
instead of failing on
-            // an isolated background-thread spike: a leaked thread cannot 
disappear in a later
-            // phase, while an unrelated transient thread can.
+            // Judge persistent growth between equal measured phases. 
Comparing the early and late
+            // low-water marks allows a bounded worker-pool warm-up or an 
isolated background-thread
+            // spike, while a leaked thread cannot disappear in a later phase.
             def jvmCounts = jvmPhases.collect { sample -> sample[backendId] as 
long }
             def processCounts = processPhases.collect { sample -> 
sample[backendId] as long }
             def earlyJvmFloor = jvmCounts.take(2).min()
@@ -146,14 +142,8 @@ suite("test_paimon_write_thread_lifecycle", 
"p0,external,paimon,nonConcurrent")
             def earlyProcessFloor = processCounts.take(2).min()
             def lateProcessFloor = processCounts.drop(2).min()
 
-            assertTrue(jvmCounts.min() <= jvmBefore[backendId] + 2,
-                    "JVM threads never returned to the warm-up baseline on 
backend ${backendId}: "
-                            + "baseline=${jvmBefore[backendId]}, 
phases=${jvmCounts}")
             assertTrue(lateJvmFloor <= earlyJvmFloor + 2,
                     "JVM threads kept growing on backend ${backendId}: 
phases=${jvmCounts}")
-            assertTrue(processCounts.min() <= processBefore[backendId] + 4,
-                    "Process threads never returned to the warm-up baseline on 
backend ${backendId}: "
-                            + "baseline=${processBefore[backendId]}, 
phases=${processCounts}")
             assertTrue(lateProcessFloor <= earlyProcessFloor + 4,
                     "Process threads kept growing on backend ${backendId}: 
phases=${processCounts}")
         }


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

Reply via email to