You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[fix](be) Hand off query spill cleanup to background GC
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: Query teardown previously deleted the complete spill directory tree synchronously. A large residual spill tree could block a scheduler worker, and a filesystem failure was only logged without retry. In addition, recursive CTE rerunnable parameters retained QueryContext after a successful final close. Empty query directories are now removed with a bounded rmdir; non-empty trees are atomically handed off to the spill GC directory, with failed handoffs retried. Rerunnable parameters are released after FINAL_CLOSE and during query-manager shutdown outside the protecting mutex, allowing QueryContext and its spill directories to be reclaimed.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- `./run-be-ut.sh --run --filter='SpillFileTest.QueryContextDeletesEmptySpillDirectoryWithoutHandoff:SpillFileTest.QueryContextCleansUpNestedSpillDirectory:SpillFileTest.QueryContextCleansUpResidualSpillDirectory:SpillFileTest.QueryContextContinuesCleanupAfterRootFailure:SpillFileTest.FinalCloseReleasesRerunnableQueryContextAndHandsOffSpillDirectory:FragmentMgrRerunnableParamsTest.StopReleasesLastQueryContextRefOutsideLock'`
- Behavior changed: Yes. Query spill cleanup is handed off to background GC and retried after transient failures; recursive CTE final-close state no longer retains QueryContext.
- Does this need documentation: No
0 commit comments