diff options
author | Mathieu Velten <mathieuv@matrix.org> | 2022-05-17 19:01:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-17 17:01:06 +0000 |
commit | 182ca78a12c4ae0f37726d43d5e592d669d99ee1 (patch) | |
tree | 0b52a822d0d3d89d95d7a62ed7d5de6dabf9a43f | |
parent | allow `on_invalidate=None` in `@cached` methods (#12769) (diff) | |
download | synapse-182ca78a12c4ae0f37726d43d5e592d669d99ee1.tar.xz |
Delete events from federation_inbound_events_staging table on purge (#12770)
-rw-r--r-- | changelog.d/12770.bugfix | 1 | ||||
-rw-r--r-- | synapse/storage/databases/main/purge_events.py | 1 | ||||
-rw-r--r-- | tests/rest/admin/test_room.py | 1 |
3 files changed, 3 insertions, 0 deletions
diff --git a/changelog.d/12770.bugfix b/changelog.d/12770.bugfix new file mode 100644 index 0000000000..a958f9a16b --- /dev/null +++ b/changelog.d/12770.bugfix @@ -0,0 +1 @@ +Delete events from the `federation_inbound_events_staging` table when a room is purged through the admin API. diff --git a/synapse/storage/databases/main/purge_events.py b/synapse/storage/databases/main/purge_events.py index 38ba91af4c..c94d5f9f81 100644 --- a/synapse/storage/databases/main/purge_events.py +++ b/synapse/storage/databases/main/purge_events.py @@ -417,6 +417,7 @@ class PurgeEventsStore(StateGroupWorkerStore, CacheInvalidationWorkerStore): "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,)) diff --git a/tests/rest/admin/test_room.py b/tests/rest/admin/test_room.py index 95282f078e..608d3f2dc3 100644 --- a/tests/rest/admin/test_room.py +++ b/tests/rest/admin/test_room.py @@ -2489,4 +2489,5 @@ PURGE_TABLES = [ "room_tags", # "state_groups", # Current impl leaves orphaned state groups around. "state_groups_state", + "federation_inbound_events_staging", ] |