SERVER-139274In Progress

Pace incremental spilling with byte-count debt

This replaces the at-crossing burst with pacing: each added key accrues its serialized size as debt, and when the debt covers one batch's bytes ({{Spiller::spillBatchBytes()}}) the sorter calls {{spillIncremental()}} once, repaying the debt with the consumed elements' own sizes. Debt and repayment are in the same units, so the sorted buffer finishes its spill as the filling buffer refills, whatever the keys' sizes; a document held past the check by {{SorterBatchGuard}} leaves a tail bounded by

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.