-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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-04-15] HIGH: [Reliability] Create a 1:1:1 GetMissingOnyxMessagesForPushNotification
API command
#38954
Comments
Auto-assigning issues to engineers is no longer supported. If you think this issue should receive engineering attention, please raise it in #whatsnext. |
This is not correct.
Huh? I don't get this at all, are you saying we are breaking the But also, I don't think neither of those is happening in this flow. |
ReconnectApp should be 1:1:1. It fetches the gap of onyx updates with
We should stop doing this 👍
This part is intentional. We're attempting to fetch additional updates to keep your app up to date. This does mean that receiving a push notification in the background may generate two ReconnectApp calls:
We could combine these though it'll be a little tricky. |
Posted a PR for |
Small clarification: I was wrong, the initial API command to fill a gap is actually So far we have
Next we need to
This is just a day's worth of work but will need to go through reviews and deploy so ETA would be end of next week. |
ReceivedPushNotificationWithUpdateGap
API commandGetMissingOnyxMessagesForPushNotification
API command
After some discussion we decided not to add a new command since it would be identical to However, one thing I'm noticing on Android is that
The next time the app is opened, the callback finally runs and fills the gap. So it seems there are issues running Onyx callbacks in the background process. I confirmed this by moving that code out of the callback and just running it synchronously and it worked. This is a separate problem so I'll make a follow up issue to address it, but in the meantime, we should probably expect a bit of regression for background refresh. Follow up here: #39544 |
This was CP'd to staging and should be on production soon |
GetMissingOnyxMessagesForPushNotification
API commandGetMissingOnyxMessagesForPushNotification
API command
|
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. 🎊 |
All done! |
Problem:
Every time you get a push message, we send
ReconnectApp
, which sometimes doesGetMissingOnyxMessages
behind the scenes. This breaks 1:1:1 because every API call should generate at most one Auth call, and in this case it generates multiple.Additionally, sometime we also send
OptInToPushNotifications
. This is violating our 1:1:1 principle, as every user action (in this case, receiving a push message) should generate a single API call -- and this is sometimes generating two.Finally, it seems like we send this even if the incoming push notification shows no "gap" with the previous update.
Solution:
Fix this to follow 1:1:1 by:
ReceivedPushNotificationWithUpdateGap
API command that accepts afromUpdateID
andtoUpdateID
rangelastUpdateID
of the notification matches thelastUpdateID
of the client -- and only sendReceivedPushNotificationWithUpdateGap
if there is a gap detectedThe text was updated successfully, but these errors were encountered: