synapse/tests/federation
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
..
transport Optional whitespace support in Authorization (#1350) (#17145) 2024-05-08 13:56:16 +00:00
__init__.py
test_complexity.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_federation_catch_up.py Format files with Ruff (#17643) 2024-09-02 12:39:04 +01:00
test_federation_client.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation_devices.py Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
test_federation_media.py Add ability to limit amount uploaded by a user (#18527) 2025-07-10 13:39:09 +01:00
test_federation_out_of_band_membership.py Bump ruff from 0.7.3 to 0.11.10 (#18451) 2025-05-20 15:23:30 +01:00
test_federation_sender.py Move device changes off the main process (#18581) 2025-07-18 09:06:14 +02:00
test_federation_server.py Stop sending or processing the origin field in PDUs (#18418) 2025-07-01 12:04:23 +01:00