Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.55k stars 2.89k forks source link

[HOLD for payment 2024-08-07] [$500] Onyx updates are not being queued in the correct order #37560

Closed blimpich closed 3 months ago

blimpich commented 8 months ago

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 repository

Issue reported by: @paultsimura Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1709229991663269?thread_ts=1705484273.717249&cid=C01GTK53T8Q

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fec4289917eb6d71
  • Upwork Job ID: 1763289951731056640
  • Last Price Increase: 2024-02-29
  • Automatic offers:
    • jjcoffee | Reviewer | 0
    • paultsimura | Contributor | 0
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
tgolen commented 3 months ago

I don't think we need to have a C+ if it's just a version bump.

melvin-bot[bot] commented 3 months ago

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] commented 3 months ago

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.14-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-08-07. :confetti_ball:

For reference, here are some details about the assignees on this issue:

melvin-bot[bot] commented 3 months ago

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:

Christinadobrzyn commented 3 months ago

Payouts due:

Do we need a regression test @paultsimura?

paultsimura commented 3 months ago

Sorry @Christinadobrzyn, this one is $500, not $250 as mentioned in the payment summary.

paultsimura commented 3 months ago

I was not a C+ here, but would suggest the regression test:

  1. Submit a distance request with 3 waypoints
  2. Navigate to the distance request details (transaction thread)
  3. Disable the internet connection
  4. Click on the distance field to edit
  5. Click on a waypoint
  6. Click on the 3 dot menu > Delete waypoint
  7. Hit Save
  8. Switch chat
  9. Go back online
  10. Go back to the transaction thread
  11. Click "distance" again
  12. Verify the deleted waypoint is not present (i.e. it's "indeed" deleted)
jjcoffee commented 3 months ago

@Christinadobrzyn No payment due to me as I never reviewed anything in the end :pray:

Christinadobrzyn commented 3 months ago

Thanks @paultsimura and @jjcoffee - are we paying someone else? @sobitneupane I see you on the PR, were you the C+ for this?

paultsimura commented 3 months ago

Technically, there was no C+ here, only me and @tgolen mostly.

Christinadobrzyn commented 3 months ago

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!