From 4ea546067dcdd5a3e67adc56a02645a2724636c8 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Mon, 16 May 2022 16:30:35 +0100 Subject: [PATCH 1/3] Fix query performance for /sync (#12745) --- changelog.d/12745.bugfix | 1 + synapse/storage/databases/main/stream.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/12745.bugfix diff --git a/changelog.d/12745.bugfix b/changelog.d/12745.bugfix new file mode 100644 index 000000000..d1dc8d03a --- /dev/null +++ b/changelog.d/12745.bugfix @@ -0,0 +1 @@ +Fix DB performance regression introduced in v1.59.0rc2. diff --git a/synapse/storage/databases/main/stream.py b/synapse/storage/databases/main/stream.py index 3c3137fe6..0373af86c 100644 --- a/synapse/storage/databases/main/stream.py +++ b/synapse/storage/databases/main/stream.py @@ -750,7 +750,7 @@ class StreamWorkerStore(EventsWorkerStore, SQLBaseStore): WHERE room_id = ? AND stream_ordering <= ? AND NOT outlier - AND rejections.reason IS NULL + AND rejections.event_id IS NULL ORDER BY stream_ordering DESC LIMIT 1 """ From 5c3d525cada69c2df3be65111d62ddcb52623a16 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 17 May 2022 10:27:51 +0100 Subject: [PATCH 2/3] 1.59.0 --- CHANGES.md | 16 ++++++++++++++-- changelog.d/12745.bugfix | 1 - debian/changelog | 6 ++++++ pyproject.toml | 2 +- 4 files changed, 21 insertions(+), 4 deletions(-) delete mode 100644 changelog.d/12745.bugfix diff --git a/CHANGES.md b/CHANGES.md index 347aae8f6..81feeb927 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,5 @@ -Synapse 1.59.0rc2 (2022-05-16) -============================== +Synapse 1.59.0 (2022-05-17) +=========================== Synapse 1.59 makes several changes that server administrators should be aware of: @@ -10,6 +10,18 @@ See [the upgrade notes](https://github.com/matrix-org/synapse/blob/develop/docs/ Additionally, this release removes the non-standard `m.login.jwt` login type from Synapse. It can be replaced with `org.matrix.login.jwt` for identical behaviour. This is only used if `jwt_config.enabled` is set to `true` in the configuration. ([\#12597](https://github.com/matrix-org/synapse/issues/12597)) + +Bugfixes +-------- + +- Fix DB performance regression introduced in v1.59.0rc2. ([\#12745](https://github.com/matrix-org/synapse/issues/12745)) + + +Synapse 1.59.0rc2 (2022-05-16) +============================== + +Note: this release candidate includes a performance regression which can cause database disruption. Other release candidates in the v1.59.0 series are not affected, and a fix will be included in the v1.59.0 final release. + Bugfixes -------- diff --git a/changelog.d/12745.bugfix b/changelog.d/12745.bugfix deleted file mode 100644 index d1dc8d03a..000000000 --- a/changelog.d/12745.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix DB performance regression introduced in v1.59.0rc2. diff --git a/debian/changelog b/debian/changelog index 7f9bedd7a..cc6152d5b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +matrix-synapse-py3 (1.59.0) stable; urgency=medium + + * New Synapse release 1.59.0. + + -- Synapse Packaging team Tue, 17 May 2022 10:26:50 +0100 + matrix-synapse-py3 (1.59.0~rc2) stable; urgency=medium * New Synapse release 1.59.0rc2. diff --git a/pyproject.toml b/pyproject.toml index 1a2ddddb1..e600a1d52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ skip_gitignore = true [tool.poetry] name = "matrix-synapse" -version = "1.59.0rc2" +version = "1.59.0" description = "Homeserver for the Matrix decentralised comms protocol" authors = ["Matrix.org Team and Contributors "] license = "Apache-2.0" From 44d7bb13c357fb8cb6ff7c75f5abc189fa530529 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 17 May 2022 10:30:31 +0100 Subject: [PATCH 3/3] version tweak in changelog --- CHANGES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 81feeb927..56d1a5a7d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -14,7 +14,7 @@ Additionally, this release removes the non-standard `m.login.jwt` login type fro Bugfixes -------- -- Fix DB performance regression introduced in v1.59.0rc2. ([\#12745](https://github.com/matrix-org/synapse/issues/12745)) +- Fix DB performance regression introduced in Synapse 1.59.0rc2. ([\#12745](https://github.com/matrix-org/synapse/issues/12745)) Synapse 1.59.0rc2 (2022-05-16)