1
0
Fork 0
mirror of https://github.com/element-hq/synapse.git synced 2025-03-05 15:37:02 +00:00
synapse/tests/rest
Mathieu Velten b3ba501c52
Properly purge state groups tables when purging a room (#18024)
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 of `state_groups` table to
decide what to delete instead of doing an indirection through
`event_to_state_groups`.

Related to https://github.com/element-hq/synapse/issues/3364.

### Pull Request Checklist

* [x] Pull request is based on the develop branch
* [x] Pull request includes a [changelog
file](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#changelog).
* [x] [Code
style](https://element-hq.github.io/synapse/latest/code_style.html) is
correct
(run the
[linters](https://element-hq.github.io/synapse/latest/development/contributing_guide.html#run-the-linters))

---------

Co-authored-by: Erik Johnston <erikj@jki.re>
2025-01-06 15:32:18 +00:00
..
admin Properly purge state groups tables when purging a room (#18024) 2025-01-06 15:32:18 +00:00
client Promote account suspension to stable (#17964) 2024-12-04 17:56:42 -06:00
key Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
media Enable authenticated media by default (#17889) 2024-11-20 14:48:22 +00:00
synapse An federation whitelist query endpoint extension (#16848) 2024-05-13 19:38:45 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_health.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_well_known.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00