924060929 opened a new pull request, #68327:
URL: https://github.com/apache/doris/pull/68327

   [fix](fe) Isolate catalog deadlock UT from Env cold start
   
   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #67417
   
   Problem Summary: 
ExternalCatalogDeadlockTest#testDatabaseResetShouldNotDeadlockWithTableCacheLoader
   is flaky on branch-4.1. The test runs database.resetMetaToUninitialized() on 
the
   "deadlock-database-reset" thread and bounds it with a fixed 5s 
deadlock-detection scan plus a 5s
   join. On a fresh FE UT worker, resetMetaToUninitialized() ends with the first
   Env.getCurrentEnv() call, so the global Env cold start (ConsistencyChecker, 
Auth root/admin,
   auth plugin discovery, MTMVService, KeyManager) executes on that same 
bounded thread. On slower
   TeamCity workers this takes around 8s, so the thread is still alive when 
assertNoDeadlock()
   checks refreshThread.isAlive() and the test fails with:
   
     org.opentest4j.AssertionFailedError: deadlock-database-reset is still 
running
   
   ThreadMXBean.findDeadlockedThreads() reports no JVM deadlock, which confirms 
the failure is a
   false positive: unrelated global initialization was measured inside the 
lock-ordering window.
   
   Initialize Env once in @BeforeAll so the bounded concurrency harness only 
measures the
   catalog/database cache lock ordering. This is the same fix already validated 
on the PR #66913
   branch.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test: No need to test (test-only change, no production code touched)
       - The patch is byte-identical to the Env-cold-start fix already 
validated for this test on
         the PR #66913 branch
       - mvn -pl fe-core checkstyle:check: 0 violations
   - Behavior changed: No
   - Does this need documentation: No
   


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