-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix for _PushStatus Stuck 'running' when Count is Off #4319
Fix for _PushStatus Stuck 'running' when Count is Off #4319
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4319 +/- ##
==========================================
+ Coverage 92.5% 92.52% +0.02%
==========================================
Files 118 118
Lines 8256 8256
==========================================
+ Hits 7637 7639 +2
+ Misses 619 617 -2
Continue to review full report at Codecov.
|
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.
I would completely remove the count as in the end, it’s useless to keep it as a count, perhaps use the number batch inside the count field instead. This way we don’t need to change the schema either.
I originally used just |
Nope no references whatsoever. The scheduled state is not handled in the dashboard though: |
CI failed with the following:
Local looked fine so I'm rerunning to see if it clears. |
@flovilmart alright tests look good 👍 |
Looks great thanks! |
…y#4319) * Fix for _PushStatus stuck 'running' if count is off * use 'count' for batches * push worker test fix
This is a proposed fix for #4315, where
count
computed for tracking outstanding pushes can differ from the actual # of devices that will be sent to.During large operations this can occur where there is a significant time variation between the original computing of
count
and completion of the pushes. Also count can potentially provide an incorrect value on sharded dbs. With this in mind it makes more sense to track the batches instead. The # of batches is computed from thecount
that is set on_PushStatus
, and even if the number of matched_Installation
objects changes this does not. Given that, you can reliably track the batches instead of the count and still have an accuraterunning
time.This does not modify the existing behavior with
count
, so any dependence that anything or anyone may have on that factor is unchanged. The tracking for batches is achieved via an additionalbatches
field on_PushStatus
.This adds some tests with a modified push adapter that either 'drops' or 'adds' installations during send ops to simulate
count
being inaccurate.