Skip to content

Consider bulk_update_mappings or similar for delivery receipts #1494

Open
@terrazoon

Description

@terrazoon

In notifications_dao:dao_update_notifications_message_id() we are going to be doing batch updates in the short term to get an immediate performance improvement.

In the long term we would like to do something even better, something like db.session.bulk_update_mappings(receipts) or a more modern alternative.

The problem is, the delivery receipts do not contain the ids for the notifications, and id is the primary key for that table, and you need the primary key to do the super fast bulk updates.

So we have to map message ids to notification ids somehow, and get them into the delivery receipts, without giving up all the performance gains we would get from moving to bulk updates.

One idea might be to put message id, notification id key pairs into redis in a big list.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions