element-hq / element-hq/synapse

My HS has accumulated thousands of unreferenced state groups

Open
#3,364 3 comments 6 reactions 0 assignees View on GitHub
A-Database A-Disk-Space roadmap S-Minor T-Defect z-p2
Dominant language
Python
Stars
4.6k
Forks
600
Avg merge
5d 22h
Merged PRs (30d)
51

Description

This issue has been migrated from [#3364](https://github.com/matrix-org/synapse/issues/3364).

---

... which are filling up my disk :(

----

To check if you are also affected, run this query:

```sql
select count(*) from state_groups sg
left join event_to_state_groups esg on esg.state_group=sg.id
left join state_group_edges e on e.prev_state_group=sg.id
where esg.state_group is null and e.prev_state_group is null;
```

if you see numbers in the thousands, then it is this issue. Otherwise, you're not affected by this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.