SERVER-138778ClosedFixed

Add incremental spilling support to Spiller and ContainerBasedSpiller

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

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1026
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.