SERVER-138791ClosedFixed

Keep the $replaceRoot new-root check of SBE from looking dead

{{$replaceRoot}} and {{$replaceWith}} must fail when the new root is not a document, even when no later stage reads the new root. With {{featureFlagSbeBlueprintRewrites}} on, SBE blueprint dead slot elimination removes the unread new-root entry and the check with it, so on {{{x: 1}}} the pipeline {{[{$replaceWith: "$x"}, {$replaceWith: {ok: 1}}]}} returns {{{ok: 1}}} instead of failing. * Mark the new-root slot with {{SbBlueprint::keepSlot()}} in {{buildReplaceRoot()}}, as the sort's parallel a

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-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification

No labels assigned.