MatrixSynapse/synapse/storage
Nick Mills-Barrett e6af49fbea
Reintroduce membership tables event stream ordering (#15128)
* Add `event_stream_ordering` column to membership state tables

Specifically this adds the column to `current_state_events`,
`local_current_membership` and `room_memberships`. Each of these tables
is regularly joined with the `events` table to get the stream ordering
and denormalising this into each table will yield significant query
performance improvements once used.

* Make denormalised `event_stream_ordering` columns foreign keys
* Add comment in schema file explaining new denormalised columns
* Add triggers to enforce consistency of `event_stream_ordering` columns
* Re-order purge room tables to account for foreign keys
* Bump schema version to 75

Co-authored-by: David Robertson <david.m.robertson1@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2023-03-24 11:44:01 +00:00
..
controllers Include the room ID in more purge room log lines. (#15222) 2023-03-08 20:08:56 +00:00
databases Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
engines Use mypy 1.0 (#15052) 2023-02-16 16:09:11 +00:00
schema Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
util Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
__init__.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
_base.py Add final type hint to synapse.server. (#15035) 2023-02-09 09:49:04 -05:00
background_updates.py Handle half-created indices in receipts index background update (#14650) 2022-12-09 23:02:11 +00:00
database.py Add missing type hints to `synapse.storage.database`. (#15230) 2023-03-09 07:10:09 -05:00
keys.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
prepare_database.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
roommember.py Do not include rooms with an unknown room version in a sync response. (#10644) 2021-08-19 11:12:55 -04:00
types.py Use mypy 1.0 (#15052) 2023-02-16 16:09:11 +00:00