Skip to content
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

Fix effects to initialize when unrelated atoms are updated #775

Closed

Conversation

drarmstr
Copy link
Contributor

@drarmstr drarmstr commented Dec 1, 2020

Summary: Multiple customers reported a corner case (see #774) that atom effects would not initialize atom values if the atom was initialized due to an async action that also updated unrelated atom values. It looks like in those situations the nextTree was started, but the effects were only mutating currentTree during initialization.

Differential Revision: D25237913

Summary: Multiple customers reported a corner case (see [facebookexperimental#774](facebookexperimental#774)) that atom effects would not initialize atom values if the atom was initialized due to an async action that also updated unrelated atom values.  It looks like in those situations the `nextTree` was started, but the effects were only mutating `currentTree` during initialization.

Differential Revision: D25237913

fbshipit-source-id: 783cc039e71b1f84ff9916b8a3f1167d0adca001
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Dec 1, 2020
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D25237913

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 47f0651.

@drarmstr drarmstr deleted the export-D25237913 branch December 16, 2020 20:06
@drarmstr drarmstr added the bug Something isn't working label Dec 16, 2020
AlexGuz23 pushed a commit to AlexGuz23/Recoil that referenced this pull request Nov 3, 2022
Summary:
Pull Request resolved: facebookexperimental/Recoil#775

Multiple customers reported a corner case (see [#774](facebookexperimental/Recoil#774)) that atom effects would not initialize atom values if the atom was initialized due to an async action that also updated unrelated atom values.  It looks like in those situations the `nextTree` was started, but the effects were only mutating `currentTree` during initialization.

Reviewed By: davidmccabe

Differential Revision: D25237913

fbshipit-source-id: 9d01392fd910163171ffdfb489c646eee6c5cd4d
snipershooter0701 pushed a commit to snipershooter0701/Recoil that referenced this pull request Mar 5, 2023
Summary:
Pull Request resolved: facebookexperimental/Recoil#775

Multiple customers reported a corner case (see [#774](facebookexperimental/Recoil#774)) that atom effects would not initialize atom values if the atom was initialized due to an async action that also updated unrelated atom values.  It looks like in those situations the `nextTree` was started, but the effects were only mutating `currentTree` during initialization.

Reviewed By: davidmccabe

Differential Revision: D25237913

fbshipit-source-id: 9d01392fd910163171ffdfb489c646eee6c5cd4d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting atom from an effect concurrently with another update loses the value
2 participants