forked-synapse/synapse/storage/databases/main
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
..
__init__.py Allow use of the /filter Client-Server APIs on workers. (#15134) 2023-02-28 16:37:19 +00:00
account_data.py Experimental MSC3890 Implementation: Fix deleting account data when using an account data writer worker (#14869) 2023-03-03 10:51:57 +00:00
appservice.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
cache.py Remove support for aggregating reactions (#15172) 2023-02-28 18:49:28 +00:00
censor_events.py Safe async event cache (#13308) 2022-07-19 11:25:29 +00:00
client_ips.py
deviceinbox.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
devices.py Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
directory.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
e2e_room_keys.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
end_to_end_keys.py Split up txn for fetching device keys (#15215) 2023-03-07 08:51:34 +00:00
event_federation.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
event_push_actions.py Skip calculating unread push actions in /sync when enable_push is false. (#14980) 2023-02-14 11:10:29 +00:00
events_bg_updates.py Remove support for aggregating reactions (#15172) 2023-02-28 18:49:28 +00:00
events_forward_extremities.py
events_worker.py Make POST /_matrix/client/v3/rooms/{roomId}/report/{eventId} endpoint return 404 if event exists, but the user lacks access (#15300) 2023-03-21 13:24:03 +00:00
events.py Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
filtering.py Allow use of the /filter Client-Server APIs on workers. (#15134) 2023-02-28 16:37:19 +00:00
keys.py
lock.py Require SQLite >= 3.27.0 (#13760) 2022-09-09 11:14:10 +01:00
media_repository.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
metrics.py
monthly_active_users.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
openid.py
presence.py Always notify replication when a stream advances (#14877) 2023-01-20 18:02:18 +00:00
profile.py
purge_events.py Reintroduce membership tables event stream ordering (#15128) 2023-03-24 11:44:01 +00:00
push_rule.py Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
pusher.py Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
receipts.py Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
registration.py Add module API callbacks for adding and deleting local 3PID associations (#15044 2023-02-27 14:19:19 +00:00
rejections.py
relations.py Apply & bundle edits for non-message events. (#15295) 2023-03-21 14:19:54 -04:00
room_batch.py Remove option to skip locking of tables during emulated upserts (#14469) 2022-11-28 13:42:06 +00:00
room.py Move event_reports to RoomWorkerStore (#15165) 2023-03-02 10:38:46 +00:00
roommember.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
search.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
session.py
signatures.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
state_deltas.py
state.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
stats.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
stream.py Use immutabledict instead of frozendict (#15113) 2023-03-22 17:15:34 +00:00
tags.py Return read-only collections from @cached methods (#13755) 2023-02-10 23:29:00 +00:00
transactions.py Remove unused store method _set_destination_retry_timings_emulated. (#15266) 2023-03-14 17:32:46 +00:00
ui_auth.py
user_directory.py Refresh remote profiles that have been marked as stale, in order to fill the user directory. [rei:userdirpriv] (#14756) 2023-03-16 11:44:11 +00:00
user_erasure_store.py