-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
ALL
-
Storage Execution 2026-03-16
-
None
-
None
-
None
-
None
-
None
-
None
-
None
The sorter’s preflight disk-space check (ensureSufficientDiskSpaceForSpilling) is currently wired only into the file-based spiller and is driven by a query-focused knob (internalQuerySpillingMinAvailableDiskSpaceBytes).
Background / Current behavior
- File-based sorter spilling does:
-
- Estimate required space for a merge batch as the sum of spill-range byte lengths.
- Take the max of that and internalQuerySpillingMinAvailableDiskSpaceBytes.
- Call ensureSufficientDiskSpaceForSpilling(tempDir, minRequiredDiskSpace) and fail early with OutOfDiskSpace if not enough room.
- The controlling knob name and placement (internalQuerySpillingMinAvailableDiskSpaceBytes under query knobs) strongly suggests it was designed for query/agg spill behavior, but it now effectively governs all file-based sorter usages, including index build paths.