From 38272be03710f0675d7f73d15a8a9c4398619b68 Mon Sep 17 00:00:00 2001 From: reivilibre Date: Thu, 13 Apr 2023 14:06:25 +0000 Subject: [PATCH] Add comma missing from #15382. (#15429) * Add missing comma * Newsfile Signed-off-by: Olivier Wilkinson (reivilibre) --------- Signed-off-by: Olivier Wilkinson (reivilibre) --- changelog.d/15429.misc | 1 + synapse/storage/databases/main/event_federation.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog.d/15429.misc diff --git a/changelog.d/15429.misc b/changelog.d/15429.misc new file mode 100644 index 0000000000..c5b054d19e --- /dev/null +++ b/changelog.d/15429.misc @@ -0,0 +1 @@ +Improve DB performance of clearing out old data from `stream_ordering_to_exterm`. diff --git a/synapse/storage/databases/main/event_federation.py b/synapse/storage/databases/main/event_federation.py index 9e6011e8ea..2ad6fa7d5e 100644 --- a/synapse/storage/databases/main/event_federation.py +++ b/synapse/storage/databases/main/event_federation.py @@ -1708,7 +1708,7 @@ class EventFederationWorkerStore(SignatureWorkerStore, EventsWorkerStore, SQLBas WHERE stream_ordering < ? """ txn.execute( - sql, (self.stream_ordering_month_ago) # type: ignore[attr-defined] + sql, (self.stream_ordering_month_ago,) # type: ignore[attr-defined] ) await self.db_pool.runInteraction(