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

Commit 182ca78

Browse files
author
Mathieu Velten
authored
Delete events from federation_inbound_events_staging table on purge (#12770)
1 parent 5331fb5 commit 182ca78

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

changelog.d/12770.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Delete events from the `federation_inbound_events_staging` table when a room is purged through the admin API.

synapse/storage/databases/main/purge_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ def _purge_room_txn(self, txn: LoggingTransaction, room_id: str) -> List[int]:
417417
"room_account_data",
418418
"room_tags",
419419
"local_current_membership",
420+
"federation_inbound_events_staging",
420421
):
421422
logger.info("[purge] removing %s from %s", room_id, table)
422423
txn.execute("DELETE FROM %s WHERE room_id=?" % (table,), (room_id,))

tests/rest/admin/test_room.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,4 +2489,5 @@ def _block_room(self, room_id: str) -> None:
24892489
"room_tags",
24902490
# "state_groups", # Current impl leaves orphaned state groups around.
24912491
"state_groups_state",
2492+
"federation_inbound_events_staging",
24922493
]

0 commit comments

Comments
 (0)