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

[HOLD for payment 2024-10-11] Optimistic API READ updates are not applied immediately if write requests are queued #48053

Closed
hannojg opened this issue Aug 27, 2024 · 12 comments
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Weekly KSv2

Comments

@hannojg
Copy link
Contributor

hannojg commented Aug 27, 2024

Slack thread

In this PR:

we introduced for read requests to happen only after any write request has completed. An example for that is this use case:

  • You are offline and create a workspace
  • then you come online
  • You created the workspace optimistically, but because you had some other write requests queued, your READ to get workspace list goes to the server before the WRITE to create the workspace
  • The READ to get workspace list uses an Onyx.set, and your optimistic workspace is not included, so it disappears
  • A few moments later, your request to create a workspace goes through, and it shows back up

however, due to that change we stopped applying optimistic READ updates immediately. Instead, now, the optimistic updates are only applied once all write requests has finished.

This can cause bugs. One bug for example is here, where we open a new component which fires a READ request on mount. It sets a loading state, and that one is expected to immediately become visible in the UI:

Screenshot 2024-08-26 at 20 32 03

But as the read requests optimistic update is delayed we just see a blank page:

Screenshot 2024-08-26 at 20 32 57

Screenshot 2024-08-27 at 08 41 49
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Weekly KSv2 labels Aug 27, 2024
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Sep 19, 2024
Copy link

melvin-bot bot commented Sep 19, 2024

This issue has not been updated in over 15 days. eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Sep 19, 2024
@hannojg
Copy link
Contributor Author

hannojg commented Sep 23, 2024

The PR is still being worked on:

I believe this is still relevant as otherwise the user can run into situation with long blank screens / waiting times, as we wait for optimistic updates to be applied while waiting for a network write request.

@hannojg
Copy link
Contributor Author

hannojg commented Oct 3, 2024

PR has been merged to staging, waiting for any regressions…

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Monthly KSv2 labels Oct 4, 2024
@melvin-bot melvin-bot bot changed the title Optimistic API READ updates are not applied immediately if write requests are queued [HOLD for payment 2024-10-11] Optimistic API READ updates are not applied immediately if write requests are queued Oct 4, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 4, 2024
Copy link

melvin-bot bot commented Oct 4, 2024

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

Copy link

melvin-bot bot commented Oct 4, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.44-12 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-10-11. 🎊

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 14, 2024

Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Oct 14, 2024
Copy link

melvin-bot bot commented Oct 16, 2024

Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Oct 18, 2024

Still overdue 6 days?! Let's take care of this!

Copy link

melvin-bot bot commented Oct 22, 2024

10 days overdue. Is anyone even seeing these? Hello?

Copy link

melvin-bot bot commented Oct 24, 2024

12 days overdue. Walking. Toward. The. Light...

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Oct 28, 2024
Copy link

melvin-bot bot commented Oct 28, 2024

This issue has not been updated in over 14 days. eroding to Weekly issue.

@melvin-bot melvin-bot bot removed the Overdue label Oct 28, 2024
@hannojg
Copy link
Contributor Author

hannojg commented Nov 4, 2024

Huh, this has been merged a long time ago. Closing this one!

@hannojg hannojg closed this as completed Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Weekly KSv2
Projects
None yet
Development

No branches or pull requests

1 participant