-
Type:
Task
-
Resolution: Fixed
-
Priority:
Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Storage Execution
-
Fully Compatible
-
Storage Execution 2026-11-23
-
None
-
None
-
None
-
None
-
None
-
None
-
None
When a primary-driven index build spills its sorter, every batch is written back to back while the collection scan is suspended, which engages flow control against concurrent user writes. Incremental spilling, one batch per call paced to the collection scan, avoids the spike, but Spiller::spill() has no way to express it.
This adds beginSpill() and spillIncremental() to the Spiller interface (the writer is created by beginSpill() and held open across spillIncremental() calls, so one logical spill produces exactly one container range), a supportsIncrementalSpilling() capability query, and the resume-position capture in ContainerSpillYielder: onSpillBegin records _lastRecordIdInserted when the sorter sorts a buffer, and onSpill persists it. No spiller reports supportsIncrementalSpilling() yet, so behavior is unchanged until SERVER-139235 wires the parameter.
- related to
-
SERVER-138780 Add resumable index build coverage for incremental spilling
-
- Open
-
-
SERVER-139235 Add incremental_sorter_spilling.js end-to-end jstest
-
- In Progress
-
- split from
-
SERVER-132056 Investigate incremental spilling in primary-driven index builds
-
- Closed
-