Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Delete events from federation_inbound_events_staging table on purge #12770

Merged
merged 3 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/12770.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete events from federation_inbound_events_staging table when a room is purged through the admin API.
anoadragon453 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions synapse/storage/databases/main/purge_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ def _purge_room_txn(self, txn: LoggingTransaction, room_id: str) -> List[int]:
"room_account_data",
"room_tags",
"local_current_membership",
"federation_inbound_events_staging",
):
logger.info("[purge] removing %s from %s", room_id, table)
txn.execute("DELETE FROM %s WHERE room_id=?" % (table,), (room_id,))
Expand Down
1 change: 1 addition & 0 deletions tests/rest/admin/test_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -2489,4 +2489,5 @@ def _block_room(self, room_id: str) -> None:
"room_tags",
# "state_groups", # Current impl leaves orphaned state groups around.
"state_groups_state",
"federation_inbound_events_staging",
]