-
Notifications
You must be signed in to change notification settings - Fork 360
feat(sdk): The Send Queue stores the sent event in the Event Cache #5920
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
Conversation
CodSpeed Performance ReportMerging #5920 will not alter performanceComparing Summary
|
The event has been sent to the server and the server has received it. Yepee! Now, we usually wait on the server to give us back the event via the sync. Problem: sometimes the network lags, can be down, or the server may be slow; well, anything can happen. It results in a weird situation where the user sees its event being sent, then disappears before it's received again from the server. To avoid this situation, this patch eagerly saves the event in the Event Cache. It's similar to what would happen if the event was echoed back from the server via the sync, but we avoid any network issues. The Event Cache is smart enought to deduplicate events based on the event ID, so it's safe to do that.
This patch replaces calls to `SerializableEventContent::from_raw` by `new`: it's simpler and safer as it's not possible to use an invalid event type.
This patch fixes a mention to a `save_send_queue_event` method. It doesn't exist: it's `save_send_queue_request`.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #5920 +/- ##
=======================================
Coverage 88.65% 88.65%
=======================================
Files 363 363
Lines 104739 104737 -2
Branches 104739 104737 -2
=======================================
+ Hits 92852 92855 +3
+ Misses 7533 7528 -5
Partials 4354 4354 ☔ View full report in Codecov by Sentry. |
andybalaam
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
The event has been sent to the server and the server has received it. Yepee! Now, we usually wait on the server to give us back the event via the sync.
Problem: sometimes the network lags, can be down, or the server may be slow; well, anything can happen. It results in a weird situation where the user sees its event being sent, then disappears before it's received again from the server.
To avoid this situation, this patch eagerly saves the event in the Event Cache. It's similar to what would happen if the event was echoed back from the server via the sync, but we avoid any network issues. The Event Cache is smart enough to deduplicate events based on the event ID, so it's safe to do that.