synapse-product/synapse/storage
Erik Johnston ae7858f184
Fix race when persisting an event and deleting a room (#12594)
This works by taking a row level lock on the `rooms` table at the start of both transactions, ensuring that they don't run at the same time. In the event persistence transaction we also check that there is an entry still in the `rooms` table.

I can't figure out how to do this in SQLite. I was just going to lock the table, but it seems that we don't support that in SQLite either, so I'm *really* confused as to how we maintain integrity in SQLite when using `lock_table`....
2022-05-03 11:47:21 +01:00
..
databases Fix race when persisting an event and deleting a room (#12594) 2022-05-03 11:47:21 +01:00
engines Refuse to start if DB has an unsafe locale (#12262) 2022-03-23 10:23:05 -07:00
schema Process device list updates asynchronously (#12365) 2022-04-12 16:50:40 +01:00
util Await un-partial-stating after a partial-state join (#12399) 2022-04-21 07:42:03 +01:00
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
_base.py Invalidate the get_users_in_room{_with_profile} caches only when necessary. (#11878) 2022-02-02 12:24:07 -05:00
background_updates.py Add config settings for background update parameters (#11980) 2022-03-11 10:46:45 -08:00
database.py Update delay_cancellation to accept any awaitable (#12468) 2022-04-22 18:20:06 +01:00
keys.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
persist_events.py Resync state after partial-state join (#12394) 2022-04-12 13:23:43 +00:00
prepare_database.py Remove unused # type: ignores (#12531) 2022-04-27 14:03:44 +01:00
purge_events.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01: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
state.py Await un-partial-stating after a partial-state join (#12399) 2022-04-21 07:42:03 +01:00
types.py Disallow untyped defs in synapse._scripts (#12422) 2022-04-11 12:41:55 +01:00