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

Commit

Permalink
Remove from the event_relations table when purging historical events. (
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep authored Jul 29, 2020
1 parent 3a00bd1 commit d90087c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.d/7978.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a long standing bug: 'Duplicate key value violates unique constraint "event_relations_id"' when message retention is configured.
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

0 comments on commit d90087c

Please sign in to comment.