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

Fix purge_room admin API #6711

Merged
merged 2 commits into from
Jan 15, 2020
Merged

Fix purge_room admin API #6711

merged 2 commits into from
Jan 15, 2020

Conversation

erikjohnston
Copy link
Member

@erikjohnston erikjohnston commented Jan 15, 2020

Fixes #6707

@erikjohnston erikjohnston force-pushed the erikj/fix_purge_room_2 branch from 5b5c612 to e0c3d42 Compare January 15, 2020 17:07
@erikjohnston erikjohnston requested a review from a team January 15, 2020 17:08
@@ -337,7 +337,7 @@ def test_purge_room(self):
"local_invites",
"room_account_data",
"room_tags",
"state_groups",
# "state_groups", # Current impl leaves orphaned state groups around.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this the likely cause of #6566?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yup, as we don't delete by room_id on state_groups but indirect via the events table. That coupled with the fact that we now are more proactive with creating state groups that aren't referenced by events means we do end up with some orphaned bits and pieces.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yup, as we don't delete by room_id on state_groups

Why not?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mainly so that we could avoid adding another index to state_groups, but I think we might just want to do that anyway.

Copy link
Member

@richvdh richvdh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, this lgtm as far as it goes. #6566 is a thing that we could do with a solution to.

@erikjohnston erikjohnston merged commit 19a1aac into develop Jan 15, 2020
@erikjohnston erikjohnston deleted the erikj/fix_purge_room_2 branch February 5, 2020 17:35
babolivier pushed a commit that referenced this pull request Sep 1, 2021
* commit '19a1aac48':
  Fix purge_room admin API (#6711)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants