summary refs log tree commit diff
path: root/changelog.d
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2021-08-27 10:15:50 +0100
committerGitHub <noreply@github.com>2021-08-27 09:15:50 +0000
commitc4fa4f37cbc734f9cd6354a5f2661efc30d73cac (patch)
treecf10c0705a4d3f89fd6ed42b71c10bd230f96a94 /changelog.d
parentSplit `FederationHandler` in half (#10692) (diff)
downloadsynapse-c4fa4f37cbc734f9cd6354a5f2661efc30d73cac.tar.xz
Fix perf of fetching the same events many times. (#10703)
The code to deduplicate repeated fetches of the same set of events was
N^2 (over the number of events requested), which could lead to a process
being completely wedged.

The main fix is to deduplicate the returned deferreds so we only await
on a deferred once rather than many times. Seperately, when handling the
returned events from the defrered we only add the events we care about
to the event map to be returned (so that we don't pay the price of
inserting extraneous events into the dict).
Diffstat (limited to 'changelog.d')
-rw-r--r--changelog.d/10703.bugfix1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog.d/10703.bugfix b/changelog.d/10703.bugfix
new file mode 100644
index 0000000000..a5a4ecf8ee
--- /dev/null
+++ b/changelog.d/10703.bugfix
@@ -0,0 +1 @@
+Fix a regression introduced in v1.41.0 which affected the performance of concurrent fetches of large sets of events, in extreme cases causing the process to hang.