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

Commit

Permalink
Delete events from federation_inbound_events_staging table on purge (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Velten authored May 17, 2022
1 parent 5331fb5 commit 182ca78
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
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 the `federation_inbound_events_staging` table when a room is purged through the admin API.
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",
]

0 comments on commit 182ca78

Please sign in to comment.