-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Properly purge state groups tables when purging a room #18024
Properly purge state groups tables when purging a room #18024
Conversation
81cadd8
to
7945610
Compare
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.
Thanks!
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.
Ah, bah I can't edit the PR. Can you commit the simplifications to the delete?
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.
Woo, thanks!
@MatMaul sorry, looks like the tests didn't trigger, could you push an empty commit or something? |
Ooooh, there are conflicts, sorry! |
Co-authored-by: Erik Johnston <[email protected]>
Co-authored-by: Erik Johnston <[email protected]>
0875f1c
to
aab137d
Compare
Argh sorry, self inflicted wound (the other conflicting PR is mine 😅 ). |
Ooh, does this mean the https://github.com/erikjohnston/synapse-find-unreferenced-state-groups is getting less in the future? |
Currently purging a complex room can lead to a lot of orphaned rows left behind in the state groups tables.
It seems it is because we are loosing track of state groups sometimes.
This change uses the
room_id
indexed column ofstate_groups
table to decide what to delete instead of doing an indirection throughevent_to_state_groups
.Related to #3364.
Pull Request Checklist
(run the linters)