synapse/tests/rest/admin
Quentin Gliech 5ea2cf2484
Move device changes off the main process (#18581)
The main goal of this PR is to handle device list changes onto multiple
writers, off the main process, so that we can have logins happening
whilst Synapse is rolling-restarting.

This is quite an intrusive change, so I would advise to review this
commit by commit; I tried to keep the history as clean as possible.

There are a few things to consider:

- the `device_list_key` in stream tokens becomes a
`MultiWriterStreamToken`, which has a few implications in sync and on
the storage layer
- we had a split between `DeviceHandler` and `DeviceWorkerHandler` for
master vs. worker process. I've kept this split, but making it rather
writer vs. non-writer worker, using method overrides for doing
replication calls when needed
- there are a few operations that need to happen on a single worker at a
time. Instead of using cross-worker locks, for now I made them run on
the first writer on the list

---------

Co-authored-by: Eric Eastwood <erice@element.io>
2025-07-18 09:06:14 +02:00
..
__init__.py Update license headers 2023-11-21 15:29:58 -05:00
test_admin.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_background_updates.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_device.py Move device changes off the main process (#18581) 2025-07-18 09:06:14 +02:00
test_event_reports.py Add some useful endpoints to Admin API (#17948) 2024-12-16 13:27:34 -06:00
test_federation.py Fix typo in error message when a media ID isn't known (#17865) 2024-11-12 16:41:14 +00:00
test_jwks.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_media.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_registration_tokens.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_room.py Don't move invited users to new room when shutting down room (#18471) 2025-05-23 09:59:40 +01:00
test_scheduled_tasks.py Add an Admin API endpoint to fetch scheduled tasks (#18214) 2025-05-01 18:30:00 +00:00
test_server_notice.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_statistics.py Fix typo in error message when a media ID isn't known (#17865) 2024-11-12 16:41:14 +00:00
test_user.py Forbid locked users from using POST /login (#18594) 2025-07-02 18:18:33 +02:00
test_username_available.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00