From ae7858f184f4fd1533d0a5dd70174e3c70f529ad Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 3 May 2022 11:47:21 +0100 Subject: 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`.... --- changelog.d/12594.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/12594.bugfix (limited to 'changelog.d') diff --git a/changelog.d/12594.bugfix b/changelog.d/12594.bugfix new file mode 100644 index 0000000000..7411d9c079 --- /dev/null +++ b/changelog.d/12594.bugfix @@ -0,0 +1 @@ +Fix race when persisting an event and deleting a room that could lead to outbound federation breaking. -- cgit 1.4.1