-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-08-07] [$500] Onyx updates are not being queued in the correct order #37560
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Job added to Upwork: https://www.upwork.com/jobs/~01fec4289917eb6d71 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee ( |
📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
@jjcoffee I assigned @paultsimura without proposal based off this conversation. @paultsimura is going to work on this with help from @tgolen. |
Hey @tgolen, I'd like to discuss potential ways of fixing this (actually, only one of them worked for me). This simple change fixes the issue: - return clearPromise.then(() => Promise.all(_.map(promises, (p) => p())));
+ return clearPromise.then(() => _.reduce(promises, (p, fn) => p.then(fn), Promise.resolve())); However, it makes all the batched changes execute in sequence, not in parallel, and I guess it's not something we would like, right? Screen.Recording.2024-03-01.at.00.08.10-compressed.mp4 |
This comment was marked as outdated.
This comment was marked as outdated.
@tgolen, @paultsimura, @jjcoffee, @Christinadobrzyn Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Melvin, I'm doing my best with the PR 🙂 |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
PR in the works! |
@tgolen should I open the PR, or are there some kind of regular centralized Onyx bumps? |
I think you need to open a PR. There are no regular bumps for that. @mountiny might know if there are any currently open PRs that bump the version, but I am not aware of any. |
We have just merged a PR from @hannojg but I dont think he started a bump PR yet. So we should make sure we will test for all the merged PRs in onyx compared to the one used in App now |
I don't think we need to have a C+ if it's just a version bump. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.14-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-08-07. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Payouts due:
Do we need a regression test @paultsimura? |
Sorry @Christinadobrzyn, this one is $500, not $250 as mentioned in the payment summary. |
I was not a C+ here, but would suggest the regression test:
|
@Christinadobrzyn No payment due to me as I never reviewed anything in the end 🙏 |
Thanks @paultsimura and @jjcoffee - are we paying someone else? @sobitneupane I see you on the PR, were you the C+ for this? |
Technically, there was no C+ here, only me and @tgolen mostly. |
Ah okay! Thanks @paultsimura! I paid this out based on this payment summary. The regression test is created so I think this is good to close. Let me know if I'm missing anything! |
Problem
When batching update operations (e.g. when coming online), Onyx executes the merge and mergeCollection operations in an incorrect order which leads to data inconsistency. See this comment for context.
Why do we care?
This has caused multiple issues: this, this, and is currently holding this.
What's expected?
The updates should happen in the same exact order as they've been enqueued to guarantee the eventual consistency of the data.
Note: this will probably involve working with the
react-native-onyx
repositoryIssue reported by: @paultsimura
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1709229991663269?thread_ts=1705484273.717249&cid=C01GTK53T8Q
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ChristinadobrzynThe text was updated successfully, but these errors were encountered: