summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erikj@matrix.org>2023-10-23 14:39:25 +0100
committerGitHub <noreply@github.com>2023-10-23 13:39:25 +0000
commit3bc23cc45cb6a70d53ba4032a9116029bc4f538c (patch)
treead097de2bca816d15921013fb7490390acf34ffe /synapse/storage
parentMention how to redirect the Jaeger traces to a specific Jaeger instance (#16531) (diff)
downloadsynapse-3bc23cc45cb6a70d53ba4032a9116029bc4f538c.tar.xz
Fix bug that could cause a `/sync` to tightloop with sqlite after restart (#16540)
This could happen if the last rows in the account data stream were inserted into `account_data`. After a restart the max account ID would be calculated without looking at the `account_data` table, and so have an old ID.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/account_data.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/storage/databases/main/account_data.py b/synapse/storage/databases/main/account_data.py
index 39498d52c6..84ef8136c2 100644
--- a/synapse/storage/databases/main/account_data.py
+++ b/synapse/storage/databases/main/account_data.py
@@ -94,7 +94,10 @@ class AccountDataWorkerStore(PushRulesWorkerStore, CacheInvalidationWorkerStore)
                 hs.get_replication_notifier(),
                 "room_account_data",
                 "stream_id",
-                extra_tables=[("room_tags_revisions", "stream_id")],
+                extra_tables=[
+                    ("account_data", "stream_id"),
+                    ("room_tags_revisions", "stream_id"),
+                ],
                 is_writer=self._instance_name in hs.config.worker.writers.account_data,
             )