-
- Downloads
Add locking to more safely delete state groups: Part 1 (#18107)
Currently we don't really have anything that stops us from deleting
state groups when an in-flight event references it. This is a fairly
rare race currently, but we want to be able to more aggressively delete
state groups so it is important to address this to ensure that the
database remains valid.
This implements the locking, but doesn't actually use it.
See the class docstring of the new data store for an explanation for how
this works.
---------
Co-authored-by:
Devon Hudson <devon.dmytro@gmail.com>
Showing
- changelog.d/18107.bugfix 1 addition, 0 deletionschangelog.d/18107.bugfix
- synapse/handlers/federation_event.py 14 additions, 4 deletionssynapse/handlers/federation_event.py
- synapse/state/__init__.py 55 additions, 6 deletionssynapse/state/__init__.py
- synapse/storage/controllers/persist_events.py 21 additions, 11 deletionssynapse/storage/controllers/persist_events.py
- synapse/storage/databases/__init__.py 8 additions, 2 deletionssynapse/storage/databases/__init__.py
- synapse/storage/databases/state/deletion.py 446 additions, 0 deletionssynapse/storage/databases/state/deletion.py
- synapse/storage/databases/state/store.py 24 additions, 15 deletionssynapse/storage/databases/state/store.py
- synapse/storage/schema/__init__.py 4 additions, 1 deletionsynapse/storage/schema/__init__.py
- synapse/storage/schema/state/delta/89/01_state_groups_deletion.sql 39 additions, 0 deletions...torage/schema/state/delta/89/01_state_groups_deletion.sql
- tests/handlers/test_federation_event.py 7 additions, 2 deletionstests/handlers/test_federation_event.py
- tests/rest/client/test_rooms.py 2 additions, 2 deletionstests/rest/client/test_rooms.py
- tests/storage/test_state_deletion.py 411 additions, 0 deletionstests/storage/test_state_deletion.py
- tests/test_state.py 15 additions, 3 deletionstests/test_state.py
Loading
Please register or sign in to comment