diff --git a/synapse/storage/event_federation.py b/synapse/storage/event_federation.py index 53289f556baf..3d62451de94f 100644 --- a/synapse/storage/event_federation.py +++ b/synapse/storage/event_federation.py @@ -393,6 +393,8 @@ def get_forward_extremeties_for_room_txn(txn): def _delete_old_forward_extrem_cache(self): def _delete_old_forward_extrem_cache_txn(txn): + # Delete entries older than a month, while making sure we don't delete + # the only entries for a room. sql = (""" DELETE FROM stream_ordering_to_exterm WHERE