-
Notifications
You must be signed in to change notification settings - Fork 47.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Flight / Flight Reply] Don't clear pending listeners when entering blocked state #29201
Merged
Conversation
This file contains 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
Triggered by vercel/next.js#66033 I was suspecting that the bug was introduced with facebook#28996, but I could not make the test succeed on a commit before that PR, so maybe this assumption is wrong.
The cyclic state might have added listeners that will still need to be invoked.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
facebook-github-bot
added
the
React Core Team
Opened by a member of the React Core Team
label
May 21, 2024
Comparing: 5cc9f69...e56dc0b Critical size changesIncludes critical production bundles, as well as any change greater than 2%:
Significant size changesIncludes any change greater than 0.2%: Expand to show
|
gnoff
approved these changes
May 21, 2024
gnoff
pushed a commit
that referenced
this pull request
May 21, 2024
…ialized' (#29204) Follow up to #29201. If a chunk had listeners attached already (e.g. because `.then` was called on the chunk returned from `createFromReadableStream`), `wakeChunkIfInitialized` would overwrite any listeners added during chunk initialization. This caused cyclic [path references](#28996) within that chunk to never resolve. Fixed by merging the two arrays of listeners.
gnoff
added a commit
to gnoff/react
that referenced
this pull request
May 21, 2024
…isteners In facebook#29201 a fix was made to ensure we don't "forget" about some listeners when handling cyclic chunks. In facebook#29204 another fix was made for a special case when the chunk already has listeners before it first resolves. This implements the followup fix for Flight Reply which was originally missed in facebook#29204 Co-Authored-by: Janka Uryga <[email protected]>
gnoff
added a commit
that referenced
this pull request
May 21, 2024
…isteners (#29207) In #29201 a fix was made to ensure we don't "forget" about some listeners when handling cyclic chunks. In #29204 another fix was made for a special case when the chunk already has listeners before it first resolves. This implements the followup fix for Flight Reply which was originally missed in #29204 Co-authored-by: Janka Uryga <[email protected]>
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.
Fixes #29200
The cyclic state might have added listeners that will still need to be invoked. This happens if we have a cyclic reference AND end up blocked.
We have already cleared these before entering the parsing when we enter the CYCLIC state so we they already have the right type. If listeners are added during this phase they should carry over to the blocked state.