Skip to content

_PushStatus stays stuck as 'running' #4315

Closed
@flovilmart

Description

@flovilmart

When sending large number pushes, the push pipeline originally evaluates the amount of push to send by running a count on the _Installations table. This count is then stored in the _PushStatus object and decremented each times the PushWorker completes the push send.

Now, it creates multiple issues.

  • If the pushWorker fails to dequeue tu PushWorkItem, this will never be retried, therefore the count will never be decremented.
  • If the count is off / installations are appended / removed while the push gets sent, this will also cause issues.

Counts are knowingly unreliable with mongodb. So we should not rely on those.

One fix would be to

  • remove the 'scheduled' status and replace by the 'pending'
  • make all direct push notifications go to the 'succeeded' state if there's no error scheduling the runs
  • make schedules pushes 'running' when the 1st TZ is being sent (in case of localized)
  • mark pushes as failed as we are right now.

Thoughts? @montymxb @acinader

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions