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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #66328
   
   Problem Summary:
   
   `WorkloadGroupManagerTest` creates and initializes a `SpillFileManager` for 
every test case. Initialization starts a background spill GC thread, but the 
fixture did not stop or delete the manager during teardown. Each subsequent 
test overwrote the global manager pointer, leaving the previous manager and its 
GC thread alive.
   
   The leaked threads could continue accessing process-wide test utilities 
during static destruction and trigger an ASAN heap-use-after-free when the test 
binary exited. They could also interfere with tests that use global spill GC 
debug points.
   
   This change releases workload-group-owned query resources first, then stops 
and joins the spill GC thread, deletes the manager, and finally removes the 
temporary spill directory. This matches the lifecycle used by other 
spill-related test fixtures.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
           - `GTEST_REPEAT=10 ./run-be-ut.sh --run 
--filter='WorkloadGroupManagerTest.*:DebugPointsTest.AddTest:SpillFileTest.RetryPreservesDirectoryQueuedAfterPendingDrain'
 -j 8`
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason
   
   - Behavior changed:
       - [x] No. This only corrects test fixture resource teardown.
       - [ ] Yes.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### Check List (For Reviewer who merge this PR)
   
   - [ ] Confirm the release note
   - [ ] Confirm test cases
   - [ ] Confirm document
   - [ ] Add branch pick label
   


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