forked-synapse/synapse/storage
Sean Quah f792dd74e1
Remove option to skip locking of tables during emulated upserts (#14469)
To perform an emulated upsert into a table safely, we must either:
 * lock the table,
 * be the only writer upserting into the table
 * or rely on another unique index being present.

When the 2nd or 3rd cases were applicable, we previously avoided locking
the table as an optimization. However, as seen in #14406, it is easy to
slip up when adding new schema deltas and corrupt the database.

The only time we lock when performing emulated upserts is while waiting
for background updates on postgres. On sqlite, we do no locking at all.

Let's remove the option to skip locking tables, so that we don't shoot
ourselves in the foot again.

Signed-off-by: Sean Quah <seanq@matrix.org>
2022-11-28 13:42:06 +00:00
..
controllers Remove redundant types from comments. (#14412) 2022-11-16 15:25:24 +00:00
databases Remove option to skip locking of tables during emulated upserts (#14469) 2022-11-28 13:42:06 +00:00
engines Drop support for Postgres 10 in full text search code. (#14397) 2022-11-09 09:55:34 -05:00
schema Add another index to device_lists_changes_in_room (#14534) 2022-11-23 14:09:00 +00:00
util Reintroduce #14376, with bugfix for monoliths (#14468) 2022-11-16 22:16:46 +00:00
__init__.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
_base.py Bump flake8-bugbear from 22.9.23 to 22.10.27 (#14329) 2022-11-04 18:43:14 +00:00
background_updates.py Generate separate snapshots for logical databases (#13792) 2022-09-20 14:14:12 +01:00
database.py Remove option to skip locking of tables during emulated upserts (#14469) 2022-11-28 13:42:06 +00:00
keys.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
prepare_database.py Snapshot schema 72 (#13873) 2022-09-26 18:28:32 +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 Update the rejected state of events during resync (#13459) 2022-08-11 10:42:24 +00:00
types.py Tidy up and type-hint the database engine modules (#12734) 2022-05-17 00:34:38 +01:00