-
Notifications
You must be signed in to change notification settings - Fork 260
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
feat(send queue): maintain ordering of sending #4259
Conversation
21248ab
to
cba7224
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4259 +/- ##
==========================================
- Coverage 84.94% 84.94% -0.01%
==========================================
Files 274 274
Lines 29805 29851 +46
==========================================
+ Hits 25319 25357 +38
- Misses 4486 4494 +8 ☔ View full report in Codecov by Sentry. |
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.
This looks very nice. Some questions, nothing blocking.
Prior to this patch, the send queue would not maintain the ordering of sending a media *then* a text, because it would push back a dependent request graduating into a queued request. The solution implemented here consists in adding a new priority column to the send queue, defaulting to 0 for existing events, and use higher priorities for the media uploads, so they're considered before other requests. A high priority is also used for aggregation events that are sent late, so they're sent as soon as possible, before other subsequent events.
cba7224
to
84af9e2
Compare
Prior to this patch, the send queue would not maintain the ordering of
sending a media then a text, because it would push back a dependent
request graduating into a queued request.
The solution implemented here consists in adding a new priority column
to the send queue, defaulting to 0 for existing events, and use higher
priorities for the media uploads, so they're considered before other
requests.
A high priority is also used for aggregation events that are sent late,
so they're sent as soon as possible, before other subsequent events.
Let's say it's part of #4201.