Repository navigation
[Fizz] Fix truncated prerender output under backpressure - #37901
Merged
unstubbable merged 1 commit intoOct 19, 2026
Merged
unstubbable merged 1 commit into
unstubbable merged 1 commit into
Conversation
An aborted prerender can finish all tasks while partial output remains queued. If a Node stream applies backpressure, Fizz can close it before it flushes the remaining boundaries. This bug predates react#37876 and also affects initial prerenders. Fizz now waits for `partialBoundaries` to empty before it closes the destination. The regression test forces backpressure with `highWaterMark: 1` and verifies that `push()` returns `false`. Without the fix, the stream emits the first boundary's partial content and closes before it emits the second's.
|
Comparing: e92156b...fb534ae Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: (No significant changes) Generated by sizebot against fb534ae |
unstubbable
marked this pull request as ready for review
October 19, 2026 17:29
gnoff
approved these changes
Oct 19, 2026
eps1lon
pushed a commit
to vercel/next.js
that referenced
this pull request
Oct 20, 2026
[diff react/react@ba39b32a...a6792708](react/react@ba39b32...a679270) <details> <summary>React upstream changes</summary> - react/react#37901 - react/react#37876 </details> --------- Co-authored-by: next-js-bot[bot] <279046576+next-js-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An aborted prerender can finish all tasks while partial output remains queued. If a Node stream applies backpressure, Fizz can close it before it flushes the remaining boundaries. This bug predates #37876 and also affects initial prerenders.
Fizz now waits for
partialBoundariesto empty before it closes the destination. The regression test forces backpressure withhighWaterMark: 1and verifies thatpush()returnsfalse. Without the fix, the stream emits the first boundary's partial content and closes before it emits the second's.