element-hq / element-hq/synapse
[Feature request] Room state database integrity check
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#12489](https://github.com/matrix-org/synapse/issues/12489).
---
**Description:**
A background (and/or admin-submittable) task that will walk state groups, outliers, and other calculated information of relevant rooms, and validate it.
This will then rewrite, fetch, deny or invalidate any incorrect state, and tolerantly rebuild a state group table for a particular room.
**Reasoning:**
This would be a “last resort” button for administrators to push, to fix any inconsistencies in their database.
(Hypothesis) It could possibly also work with state resets, “revalidating” a room, or provide insightful information about some internal fault or bug that would lead to state resets.
Contributor guide
Research direction
The issue names no files, tests, or entry points. Start by mapping how Synapse represents state groups, outliers, and other room database calculations, then determine how an administrator would invoke a validation task. Done means the task can identify inconsistencies and safely rewrite, fetch, deny, or invalidate incorrect state, including tolerantly rebuilding a room's state-group table.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100