Change to not require a state_groups.room_id index.

This does mean that we won't clean up orphaned state groups (i.e. state
groups that were persisted but the associated event wasn't).
This commit is contained in:
Erik Johnston 2019-11-04 13:36:57 +00:00
parent 6a0092d371
commit 7134ca7daa
4 changed files with 45 additions and 53 deletions

View file

@ -33,8 +33,8 @@ class PurgeEventsStorage(object):
"""Deletes all record of a room
"""
yield self.stores.main.purge_room(room_id)
yield self.stores.main.purge_room_state(room_id)
state_groups_to_delete = yield self.stores.main.purge_room(room_id)
yield self.stores.main.purge_room_state(room_id, state_groups_to_delete)
@defer.inlineCallbacks
def purge_history(self, room_id, token, delete_local_events):