-
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-05-09] HIGH: [API Reliability] Prevent simultaneous calls to GetMissingOnyxMessages
using a deferredUpdates
queue
#38748
Comments
Comment :) |
Job added to Upwork: https://www.upwork.com/jobs/~010f52251ca52f954d |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane ( |
No need for C+ on this one! |
ProposalPlease re-state the problem that we are trying to solve in this issue.When we receive onyxUpdates, we'll trigger one GetMissingOnyxMessages per update out of order that comes by. What is the root cause of that problem?We allow calling What changes do you think we should make in order to solve the problem?We can introduce
What alternative solutions did you explore? (Optional) |
GetMissingOnyxMessages
using a deferredUpdateQueue
GetMissingOnyxMessages
using a deferredUpdateQueue
GetMissingOnyxMessages
using a deferredUpdates
queue
GetMissingOnyxMessages
using a deferredUpdates
queueGetMissingOnyxMessages
using a deferredUpdates
queue
@Szymon20000 will start on this Today. @wildan-m thanks for your proposal, but this was already assigned to a contributor! |
@danieldoglas no worries. Is there any specific tags that determine if an issue already taken or not? |
@wildan-m you should apply only for issues that have the label |
@danieldoglas, this post contains it, Melvin might have mistakenly added it. I think you should remove it. |
Sorry bout that @wildan-m ! |
I'm taking this issue over from @Szymon20000. Going to investigate this now and give an ETA until the end of the day! |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.60-13 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-04-15. 🎊 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:
|
GetMissingOnyxMessages
using a deferredUpdates
queueGetMissingOnyxMessages
using a deferredUpdates
queue
That's fake news, we've reverted that PR and we're testing it again. |
What's the latest on this one @danieldoglas? |
Still being tested, it's a tough one to get right :( |
@danieldoglas @hungvu193 @chrispader @lschurr @eh2077 this issue is now 4 weeks old, please consider:
Thanks! |
I mean, it's assigned to someone already @MelvinBot . |
@danieldoglas i'm gonna work on the tests today! |
GetMissingOnyxMessages
using a deferredUpdates
queueGetMissingOnyxMessages
using a deferredUpdates
queue
Hopefully we'll merge this PR again tomorrow, and we won't face any issues this time 🙏🏾 |
GetMissingOnyxMessages
using a deferredUpdates
queueGetMissingOnyxMessages
using a deferredUpdates
queue
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.69-2 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-05-09. 🎊 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:
|
Payment summary: There were two reviewers on this PR. Both are due $500 |
All paid! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Background:
An onyxUpdate is content we receive through https responses or Pusher that will update the state the local data. They will only bring a smaller piece of the information that was updated, instead of constantly doing full fetches to update everything.
To guarantee that the data is in a correct state, we need those updates to be applied in order. So every update that will modify local data will have previousUpdateID and lastUpdateID. For every new update we receive, we check the received previousUpdateID with the local lastUpdateID.
If they are the same, that means that we can apply that update and we'll have a correct state of the data. If they're not, then we need to fetch the missing updates (using GetMissingOnyxMessages with an updateIDFrom with the local lastUpdateID and updateIDTo with the previousUpdateID that was received from the server.
Once we have those updates applied, we can then apply the received update.
We have onyxUpdates being applied both through http responses and Pusher (calls here and here). When we call saveUpdateInformation, we we're triggering this callback function that will pause the SequentialQueue (so we don't receive more onyxUpdates until this is finished), fetch the missing updates, apply the pending updates, and then unpause the SequentialQueue. But we can't do that with onyxUpdates that comes from pusher.
Problem:
When we receive onyxUpdates, we'll trigger one
GetMissingOnyxMessages
per update out of order that comes by.Scenario:
In this scenario, we did 2 GetMissingOnyxMessages, when 1 would be enough. Please note that this is not limited to 2 calls today: if we had received 10 messages, it would do 10 API calls.
In this scenario, we did 3 GetMissingOnyxMessages.
Possible solution:
What I'm proposing is that we implement 3 changes.
By doing those, the expected behavior for the same scenario is:
In this scenario, we only did 1 GetMissingOnyxUpdates.
Issue Owner
Current Issue Owner: @lschurrThe text was updated successfully, but these errors were encountered: