Visitar URL original
unbreak LiveState unsub when references.size === 0 by subtleGradient · Pull Request #4832 · meta/relay · GitHub
Skip to content

unbreak LiveState unsub when references.size === 0 - #4832

Closed
subtleGradient wants to merge 5 commits into
meta:mainfrom
subtleGradient:unbreak-livestate-unsub
Closed

subtleGradient wants to merge 5 commits into
meta:mainfrom
subtleGradient:unbreak-livestate-unsub

Conversation

@subtleGradient

Copy link
Copy Markdown
Contributor

fixes #4830 by ensuring that there is only a single path for evicting stuff, ensuring that maybeResolverSubscription gets called correctly

@captbaritone

Copy link
Copy Markdown
Contributor

Thank you for this. Great catch. Would you mind adding a test case here: https://github.com/facebook/relay/blob/f4c37a333575341b78979106084068cb6b27e1cf/packages/relay-runtime/store/__tests__/resolvers/ResolverGC-test.js so that we don't regress this again?

@subtleGradient
subtleGradient force-pushed the unbreak-livestate-unsub branch from 9ec3aee to 44f3de9 Compare November 12, 2024 16:00
@subtleGradient

Copy link
Copy Markdown
Contributor Author

@captbaritone added the test.
I couldn't figure out how to get the __generated__ stuff to build,
so I reused an existing fragment name, not sure if that matters or not

manually verified that the test fails before the fix and passes after the fix

@subtleGradient

Copy link
Copy Markdown
Contributor Author

bummed this didn't make it into 18.2
What still needs to happen before this can land? @captbaritone

@captbaritone

Copy link
Copy Markdown
Contributor

Sorry for the poor communication. We are in a code freeze currently so not landing any high risk changes that are not necessary, so I wanted to wait to land this one. I'm out next week, but can try to get this landed when I return.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@captbaritone has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@captbaritone merged this pull request in 1e60e47.

@subtleGradient
subtleGradient deleted the unbreak-livestate-unsub branch January 30, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@live LiveState unsubscribe cleanup function never gets called

3 participants