Skip to content

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

Closed

Description

@blimpich

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

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 29, 2024
  2. melvin-bot commented on Feb 29, 2024

    @melvin-bot

    Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

  3. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Feb 29, 2024
  4. changed the title [-]Onyx updates are not being queued in the correct order[/-] [+][$500] Onyx updates are not being queued in the correct order[/+] on Feb 29, 2024
  5. melvin-bot commented on Feb 29, 2024

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 29, 2024
  7. melvin-bot commented on Feb 29, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @jjcoffee (External)

  8. removed
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 29, 2024
  9. melvin-bot commented on Feb 29, 2024

    @melvin-bot

    📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job

  10. melvin-bot commented on Feb 29, 2024

    @melvin-bot

    📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

    Offer link
    Upwork job
    Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
    Keep in mind: Code of Conduct | Contributing 📖

  11. 66 remaining items

  12. melvin-bot commented on Jul 31, 2024

    @melvin-bot

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

  13. melvin-bot commented on Jul 31, 2024

    @melvin-bot

    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:

  14. melvin-bot commented on Jul 31, 2024

    @melvin-bot

    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:

    • [@paultsimura] The PR that introduced the bug has been identified. Link to the PR:
    • [@paultsimura] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
    • [@paultsimura] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
    • [@paultsimura] Determine if we should create a regression test for this bug.
    • [@paultsimura] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
    • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/418518
  15. Christinadobrzyn commented on Aug 6, 2024

    @Christinadobrzyn
    Contributor

    Payouts due:

    Do we need a regression test @paultsimura?

  16. paultsimura commented on Aug 7, 2024

    @paultsimura
    Contributor

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

  17. paultsimura commented on Aug 7, 2024

    @paultsimura
    Contributor

    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)
  18. jjcoffee commented on Aug 7, 2024

    @jjcoffee
    Contributor

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

  19. removed their assignment
    on Aug 7, 2024
  20. Christinadobrzyn commented on Aug 7, 2024

    @Christinadobrzyn
    Contributor

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

  21. paultsimura commented on Aug 7, 2024

    @paultsimura
    Contributor

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

  22. Christinadobrzyn commented on Aug 7, 2024

    @Christinadobrzyn
    Contributor

    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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions