mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-07 22:14:57 -04:00
Add a background task to purge unused chain IDs. (#9542)
This is a companion change to apply the fix in #9498 /
922788c604
to previously
purged rooms.
This commit is contained in:
parent
e9df3f496b
commit
dc51d8ffaf
4 changed files with 99 additions and 6 deletions
|
@ -331,13 +331,9 @@ class PurgeEventsStore(StateGroupWorkerStore, SQLBaseStore):
|
|||
txn.executemany(
|
||||
"""
|
||||
DELETE FROM event_auth_chain_links WHERE
|
||||
(origin_chain_id = ? AND origin_sequence_number = ?) OR
|
||||
(target_chain_id = ? AND target_sequence_number = ?)
|
||||
origin_chain_id = ? AND origin_sequence_number = ?
|
||||
""",
|
||||
(
|
||||
(chain_id, seq_num, chain_id, seq_num)
|
||||
for (chain_id, seq_num) in referenced_chain_id_tuples
|
||||
),
|
||||
referenced_chain_id_tuples,
|
||||
)
|
||||
|
||||
# Now we delete tables which lack an index on room_id but have one on event_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue