From f9a4fcc4d2771f815bab48f865a1068d3d230aaf Mon Sep 17 00:00:00 2001 From: Brent Gardner Date: Tue, 2 Jun 2026 10:23:17 -0600 Subject: [PATCH] HEADROOM_FACTOR 6.0 -> 5.0: surface nested_loop_join_spill leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- datafusion/sqllogictest/src/accounting_pool.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datafusion/sqllogictest/src/accounting_pool.rs b/datafusion/sqllogictest/src/accounting_pool.rs index 4bb965aef0393..aec5390879761 100644 --- a/datafusion/sqllogictest/src/accounting_pool.rs +++ b/datafusion/sqllogictest/src/accounting_pool.rs @@ -40,7 +40,7 @@ use std::sync::Arc; /// untracked allocation — by definition, since DF's pool didn't see it. /// /// 600% high, but that's what it takes to pass the SLT suite right now. Goal should be ~10% -const HEADROOM_FACTOR: f64 = 6.0; +const HEADROOM_FACTOR: f64 = 5.0; pub struct AccountingMemoryPool { inner: Arc,