summary refs log tree commit diff
path: root/changelog.d/13005.misc
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2022-06-15 16:17:14 +0100
committerGitHub <noreply@github.com>2022-06-15 15:17:14 +0000
commit0d1d3e070886694eff1fa862cd203206b1a63372 (patch)
treee75ba818b9fbb9b39b53b649c850799b2634aeee /changelog.d/13005.misc
parentRename complement-developonly (#13046) (diff)
downloadsynapse-0d1d3e070886694eff1fa862cd203206b1a63372.tar.xz
Speed up `get_unread_event_push_actions_by_room` (#13005)
Fixes #11887 hopefully.

The core change here is that `event_push_summary` now holds a summary of counts up until a much more recent point, meaning that the range of rows we need to count in `event_push_actions` is much smaller.

This needs two major changes:
1. When we get a receipt we need to recalculate `event_push_summary` rather than just delete it
2. The logic for deleting `event_push_actions` is now divorced from calculating `event_push_summary`.

In future it would be good to calculate `event_push_summary` while we persist a new event (it should just be a case of adding one to the relevant rows in `event_push_summary`), as that will further simplify the get counts logic and remove the need for us to periodically update `event_push_summary` in a background job.
Diffstat (limited to 'changelog.d/13005.misc')
-rw-r--r--changelog.d/13005.misc1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/13005.misc b/changelog.d/13005.misc
new file mode 100644
index 0000000000..3bb51962e7
--- /dev/null
+++ b/changelog.d/13005.misc
@@ -0,0 +1 @@
+Reduce DB usage of `/sync` when a large number of unread messages have recently been sent in a room.