This repository was archived by the owner on Apr 26, 2024. It is now read-only.
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Deleting events causes database corruption #13476
Closed
Description
Deleting events - whether you do it via the purge history admin API, the delete room admin API, or by enabling retention on your server - has potential to corrupt the database.
In short, the delete operations can race against other operations (notably event persistence), leading the database to get into an inconsistent state. The main reason is that the delete operations do not invalidate the in-memory caches, but in general there are a bunch of race conditions.
Examples include:
- Error backfilling in room for 10 minutes after purging history #9864
- completely broken room after purge_room/rejoin #11521
- non-existent event-forward-extremities (Forward extremity event missing from database, leading to
No state group for unknown or outlier event
#12507 (comment)), or outlier forward extremities ("No state group for unknown or outlier event" error in federation #13026). Also ERROR - POST-758856 - Failed handle request via 'RoomMembershipRestServlet' – when trying to leave room #13524.
Metadata
Metadata
Assignees
Labels
Things that have led to unexpected state in Synapse or the databaseIssues related to Synapse's support of MSC1763 (message retention policies)Affects or can be seen by some users regularly or most users rarelyMajor functionality / product severely impaired, no satisfactory workaround.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.