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

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: #66328
   
   Problem Summary:
   
   Backport the spill query-directory cleanup from #66328 to `branch-4.1`.
   
   This change:
   
   - records each spill data root before opening the first spill part;
   - deletes touched per-query spill directories during `QueryContext` teardown;
   - retains failed deletions and retries them from spill GC and shutdown paths;
   - preserves the no-spill fast path without scanning every configured spill 
root.
   
   The recursive CTE and `FragmentMgr` lifecycle changes from the original PR 
are intentionally excluded because the `branch-4.1` implementation diverges. 
Spill cleanup for query contexts retained by that lifecycle remains out of 
scope for this backport.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
           - ASAN `doris_be_test` target compiled and linked successfully.
           - `./run-be-ut.sh --run 
--filter='SpillFileTest.GCCleansUpFiles:SpillFileTest.QueryContextDeletesEmptySpillDirectory:SpillFileTest.QueryContextCleansUpNestedSpillDirectory:SpillFileTest.QueryContextDeletesResidualSpillDirectory:SpillFileTest.QueryContextCleansUpAllTouchedSpillDirectories:SpillFileTest.QueryContextContinuesCleanupAfterRootFailure:SpillFileTest.QueryContextRetriesSpillDirectoryDeletionUntilSuccess:SpillFileTest.RetryPreservesDirectoryQueuedAfterPendingDrain:SpillFileTest.QueryContextSkipsCleanupWithoutSpill:SpillFileTest.DeleteSpillFileThroughManagerSynchronously'
 -j 64` (10/10 passed, then rerun 10/10 passed)
           - `build-support/check-format.sh` (passed)
           - `git diff --check` (passed)
       - [ ] 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:
       - [ ] No.
       - [x] Yes. Touched spill query directories are removed during query 
teardown, and transient deletion failures are retained for retry.
   
   - 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