This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
Consider adding (more?) foreign key constraints #12817
Labels
A-Corruption
Things that have led to unexpected state in Synapse or the database
A-Database
DB stuff like queries, migrations, new/remove columns, indexes, unexpected entries in the db
T-Task
Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.
Description:
Because of an unfortunate event, I ended up on my server with some extra accounts and rooms I wanted to delete. I used the proper (
admin/v1/deactivate
,admin/v1/rooms
andadmin/v2/rooms
) APIs of Synapse, but it left me with a database that appears inconsistent:current_state_delta_stream
,state_groups_state
andstate_groups
, but the rooms were missing fromroom_stats_state
state_group_edges
don't point tostate_groups
I'd like to clean these up, but it's hard for me because I'm not familiar with the database structure and there are no constraints to help with it.
Adding some constraints would help avoid inconsistent states (cf. #11779) and even work as documentation. If you're worried about the performance impact, they could added in a disabled state.
The text was updated successfully, but these errors were encountered: