summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-06-17 11:58:00 +0100
committerGitHub <noreply@github.com>2022-06-17 10:58:00 +0000
commit5ef05c70c30ec06376c48f443c5722fbf5dd2aa0 (patch)
tree5225d2b1852b91b9e693d60c76d36e6c3b02e34d
parentUse new `device_list_changes_in_room` table when getting device list changes ... (diff)
downloadsynapse-5ef05c70c30ec06376c48f443c5722fbf5dd2aa0.tar.xz
Rotate notifications more frequently (#13096)
-rw-r--r--changelog.d/13096.misc1
-rw-r--r--synapse/storage/databases/main/event_push_actions.py2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.d/13096.misc b/changelog.d/13096.misc
new file mode 100644
index 0000000000..3bb51962e7
--- /dev/null
+++ b/changelog.d/13096.misc
@@ -0,0 +1 @@
+Reduce DB usage of `/sync` when a large number of unread messages have recently been sent in a room.
diff --git a/synapse/storage/databases/main/event_push_actions.py b/synapse/storage/databases/main/event_push_actions.py
index ae705889a5..10a7962382 100644
--- a/synapse/storage/databases/main/event_push_actions.py
+++ b/synapse/storage/databases/main/event_push_actions.py
@@ -148,7 +148,7 @@ class EventPushActionsWorkerStore(ReceiptsWorkerStore, EventsWorkerStore, SQLBas
         self._doing_notif_rotation = False
         if hs.config.worker.run_background_tasks:
             self._rotate_notif_loop = self._clock.looping_call(
-                self._rotate_notifs, 30 * 60 * 1000
+                self._rotate_notifs, 30 * 1000
             )
 
         self.db_pool.updates.register_background_index_update(