Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

prune_old_outbound_device_pokes is burning CPU on the master #7121

@richvdh

Description

@richvdh

Every hour, it runs for 20 minutes. It's running in a database thread but I suspect it's holding the GIL for a lot of that time,

It's table-scanning the whole table, and then doing a query on every single (user_id,destination) in the table (over a million of them). The code doesn't seem to realise that users might have more than one device. We either need to optimise the query, or move the pruned remnants out to a separate table so that we aren't redoing the same work the whole time.

Related: #4115

Metadata

Metadata

Assignees

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