Lower SLT HEADROOM_FACTOR 8.0 -> 5.0 to surface nested_loop_join_spill leak#22721
Open
avantgardnerio wants to merge 1 commit into
Open
Lower SLT HEADROOM_FACTOR 8.0 -> 5.0 to surface nested_loop_join_spill leak#22721avantgardnerio wants to merge 1 commit into
avantgardnerio wants to merge 1 commit into
Conversation
CI will fail on nested_loop_join_spill.slt. That's the point — at 5x headroom, the first query allocates ~3.7 MB against a declared 150K limit. NestedLoopJoinExec has untracked allocation in three distinct sites (generate_next_batch buffering, concat_batches at the spill boundary, and take_native during probe), plus the IPC reader path on spill re-read. Fix the operator; don't relax the const. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced Jun 2, 2026
Closed
Contributor
Author
|
CI surfaced exactly the failure this PR is meant to expose: Filed #22723 to track the underlying |
This was referenced Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Follow-up to #22626 (allocator-level memory tracking in SLTs).
Rationale for this change
HEADROOM_FACTORin the SLT accounting pool is currently 8.0 — i.e. we accept allocator usage up to 8× the pool's declared limit before failing. That's loose enough to hide real leaks. Lowering it to 5.0 surfaces an untracked allocation innested_loop_join_spill.slt.At 5× headroom, the first query in that suite allocates ~3.7 MB against a declared 150K limit.
NestedLoopJoinExechas untracked allocation in at least three sites —generate_next_batchbuffering,concat_batchesat the spill boundary, andtake_nativeduring probe — plus the IPC reader path on spill re-read.What changes are included in this PR?
One constant change in
datafusion/sqllogictest/src/accounting_pool.rs:HEADROOM_FACTOR: f64 = 8.0→5.0, with updated doc comment.Are these changes tested?
CI is the test —
nested_loop_join_spill.sltis expected to fail until the operator-side leaks are fixed. That's the intended signal of this PR, not a regression.Are there any user-facing changes?
No. Test-infrastructure-only.