From 7fe5d31e201d0e89b898608f20cc8e98e0d31e4f Mon Sep 17 00:00:00 2001 From: Eric Eastwood Date: Mon, 26 Aug 2024 18:52:10 -0500 Subject: [PATCH] Note down caveat about `forgotten` --- synapse/storage/prepare_database.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/synapse/storage/prepare_database.py b/synapse/storage/prepare_database.py index 13dcf9803d..9d712d4118 100644 --- a/synapse/storage/prepare_database.py +++ b/synapse/storage/prepare_database.py @@ -718,6 +718,12 @@ def _resolve_stale_data_in_sliding_sync_membership_snapshots_table( max_stream_ordering_sliding_sync_membership_snapshots_table = row[0] + # XXX: Since `forgotten` is simply a flag on the `room_memberships` table that is + # set out-of-band, there is no way to tell whether it was set while Synapse was + # downgraded. The only thing the user can do is `/forget` again if they run into + # this. + # + # This only picks up changes to memberships. txn.execute( """ SELECT DISTINCT(user_id, room_id)