summary refs log tree commit diff
path: root/changelog.d
diff options
context:
space:
mode:
authorSean Quah <8349537+squahtx@users.noreply.github.com>2022-11-28 13:42:06 +0000
committerGitHub <noreply@github.com>2022-11-28 13:42:06 +0000
commitf792dd74e1e6f64cb15d920d87818f47f17e7848 (patch)
treedec3aa3be2e98ab6e31f457e0b29b5a08f9fcd37 /changelog.d
parentPush complement image to a docker registry (#14509) (diff)
downloadsynapse-f792dd74e1e6f64cb15d920d87818f47f17e7848.tar.xz
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>
Diffstat (limited to 'changelog.d')
-rw-r--r--changelog.d/14469.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/14469.misc b/changelog.d/14469.misc
new file mode 100644
index 0000000000..a12a21e9ae
--- /dev/null
+++ b/changelog.d/14469.misc
@@ -0,0 +1 @@
+Remove option to skip locking of tables when performing emulated upserts, to avoid a class of bugs in future.