App: [$500] Onyx updates are not being queued in the correct order

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

About this issue

  • Original URL
  • State: open
  • Created 4 months ago
  • Comments: 26 (20 by maintainers)

Most upvoted comments

Melvin, I’m doing my best with the PR 🙂

@paultsimura i think you referenced the wrong PR. i think you’re holding for https://github.com/Expensify/App/pull/38114, which has just been merged 😃

@tgolen, @paultsimura, @jjcoffee, @Christinadobrzyn Whoops! This issue is 2 days overdue. Let’s get this updated quick!

@jjcoffee I assigned @paultsimura without proposal based off this conversation. @paultsimura is going to work on this with help from @tgolen.