Fix a bug in the background task for purging chain cover. (#9583)

This commit is contained in:
Patrick Cloke 2021-03-10 08:55:52 -05:00 committed by GitHub
parent 67b979bfa1
commit 918f6ed827
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

1
changelog.d/9583.bugfix Normal file
View File

@ -0,0 +1 @@
Purge chain cover indexes for events that were purged prior to Synapse v1.29.0.

View File

@ -969,7 +969,7 @@ class EventsBackgroundUpdatesStore(SQLBaseStore):
event_id = ""
for event_id, chain_id, sequence_number, has_event in rows:
if not has_event:
unreferenced_event_ids.append(event_id)
unreferenced_event_ids.append((event_id,))
unreferenced_chain_id_tuples.append((chain_id, sequence_number))
# Delete the unreferenced auth chains from event_auth_chain_links and