forked-synapse/synapse/storage
Nick Mills-Barrett fe4719a268
Use receipts event_stream_ordering instead of joins (#17032)
Resurrecting https://github.com/matrix-org/synapse/pull/13918.

This should reduce IOPs incurred by joining to the events table to
lookup stream ordering, which happens in many receipt handling code
paths. Like the previous PR I believe sufficient time has passed between
the original migration in DB schema 72 and now to merge this as-is. It's
highly unlikely that both the migration is still ongoing AND (active)
users still have any receipts prior to that date.

In the unlikely event there is a receipt without a populated
`event_stream_ordering` synapse will behave just as it does now when
receipts exist for events that don't (yet): for push action calculation
the receipts are just ignored.

I've removed the validation on event IDs as this is already covered
here:

59ceabcb97/synapse/handlers/receipts.py (L189-L192)
2024-04-12 09:28:44 +01:00
..
controllers Clarify docs for some room state functions (#16950) 2024-03-19 17:16:37 +00:00
databases Use receipts event_stream_ordering instead of joins (#17032) 2024-04-12 09:28:44 +01:00
engines Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
schema Add forgotten schema delta (#17054) 2024-04-09 13:03:41 +01:00
util Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
_base.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
background_updates.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00
database.py Bump mypy from 1.5.1 to 1.8.0 (#16901) 2024-03-13 17:05:57 +00:00
keys.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
prepare_database.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
push_rule.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
roommember.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
types.py Bump black from 23.10.1 to 24.2.0 (#16936) 2024-03-13 16:46:44 +00:00