From 9ac6917ab8432b30178cd5ed30e196e547225456 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 6 Jun 2023 21:43:40 -0500 Subject: [PATCH 1/2] Remove superfluous `room_memberships` join from background update Spawning from https://github.com/matrix-org/synapse/pull/15731 --- synapse/storage/databases/main/roommember.py | 1 - 1 file changed, 1 deletion(-) diff --git a/synapse/storage/databases/main/roommember.py b/synapse/storage/databases/main/roommember.py index ae9c201b87e8..fd2dd186ec3a 100644 --- a/synapse/storage/databases/main/roommember.py +++ b/synapse/storage/databases/main/roommember.py @@ -1461,7 +1461,6 @@ def add_membership_profile_txn(txn: LoggingTransaction) -> int: SELECT stream_ordering, event_id, events.room_id, event_json.json FROM events INNER JOIN event_json USING (event_id) - INNER JOIN room_memberships USING (event_id) WHERE ? <= stream_ordering AND stream_ordering < ? AND type = 'm.room.member' ORDER BY stream_ordering DESC From d3e79ae1536133982d5f2c9eddbab0cfe9c2e9d1 Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Tue, 6 Jun 2023 21:45:57 -0500 Subject: [PATCH 2/2] Add changelog --- changelog.d/15733.misc | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/15733.misc diff --git a/changelog.d/15733.misc b/changelog.d/15733.misc new file mode 100644 index 000000000000..3ae7be3c27d1 --- /dev/null +++ b/changelog.d/15733.misc @@ -0,0 +1 @@ +Remove superfluous `room_memberships` join from background update.