-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Split purge API into events vs state and add PurgeEventsStorage #6295
Conversation
0251a95
to
ecfba89
Compare
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).
# Now we fetch all the state groups that should be deleted. | ||
txn.execute( | ||
""" | ||
SELECT DISTINCT state_group FROM events |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
erm, haven't we just deleted all the relevant rows from events
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gah. And the tests were broken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^
And fix the tests to actually test that things got deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, it looks plausible now, but your CI is borked
Oh, |
it's in typing_extensions |
Hmm, I don't see it in |
gah. seems you're right. Maybe we could define our own on 3.5. This is starting to get out of scope though. |
I've just moved it into the docstring for now until we figure out what we're doing :) |
* commit 'f713c01e2': Move type annotation into docstring Fix deleting state groups during room purge. Use correct type annotation Change to not require a state_groups.room_id index. Fix up comment Update log line to lie a little less Add state_groups.room_id index Docstrings Fix purge room API Newsfile Split purge API into events vs state
This is a bit big as we needed to split out the purge functions to work on events and state in separate transactions.
(Split out from #6245.)