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

Remove from the event_relations table when purging historical events. #7978

Merged
merged 2 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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/7978.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix 'Duplicate key value violates unique constraint "event_relations_id"' when message retention is configured.
clokep marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions synapse/storage/data_stores/main/purge_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ def _purge_history_txn(self, txn, room_id, token_str, delete_local_events):
# event_json
# event_push_actions
# event_reference_hashes
# event_relations
# event_search
# event_to_state_groups
# events
Expand Down Expand Up @@ -209,6 +210,7 @@ def _purge_history_txn(self, txn, room_id, token_str, delete_local_events):
"event_edges",
"event_forward_extremities",
"event_reference_hashes",
"event_relations",
"event_search",
"rejections",
):
Expand Down