synapse/tests/handlers
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 Reference Matrix Home Server 2014-08-12 15:10:52 +01:00
oidc_test_key.p8 JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
oidc_test_key.pub.pem JWT OIDC secrets for Sign in with Apple (#9549) 2021-03-09 15:03:37 +00:00
test_admin.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_appservice.py Refactor cache metrics to be homeserver-scoped (#18604) 2025-07-16 16:04:57 -05:00
test_auth.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_cas.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_deactivate_account.py Upon deactivation, forget all of the user's rooms (#17400) 2024-07-05 11:56:52 +01:00
test_device.py Move device changes off the main process (#18581) 2025-07-18 09:06:14 +02:00
test_directory.py Disable room list publication by default (#18175) 2025-02-24 12:06:16 +00:00
test_e2e_keys.py Move device changes off the main process (#18581) 2025-07-18 09:06:14 +02:00
test_e2e_room_keys.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_federation_event.py Add locking to more safely delete state groups: Part 1 (#18107) 2025-02-03 17:29:15 +00:00
test_federation.py Remove support for python 3.8 (#17908) 2024-11-06 19:36:01 +00:00
test_message.py Remove allow_no_prev_events option (MSC2716 cleanup) (#18676) 2025-07-15 15:53:56 -05:00
test_oauth_delegation.py Refactor cache metrics to be homeserver-scoped (#18604) 2025-07-16 16:04:57 -05:00
test_oidc.py Allow only requiring a field be present in an SSO response, rather than specifying a required value (#18454) 2025-05-19 17:50:02 +01:00
test_password_providers.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_presence.py Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
test_profile.py Store hashes of media files, and allow quarantining by hash. (#18277) 2025-03-27 17:26:34 +00:00
test_receipts.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
test_register.py Make user_type extensible and allow default user_type to be set (#18456) 2025-06-03 11:34:40 +00:00
test_room_list.py Disable room list publication by default (#18175) 2025-02-24 12:06:16 +00:00
test_room_member.py Add support for MSC4155 Invite filtering (#18288) 2025-06-05 11:49:09 +01:00
test_room_policy.py Policy server part 1: Actually call the policy server (#18387) 2025-05-21 22:09:09 +00:00
test_room_summary.py Add via param to hierarchy enpoint (#18070) 2025-06-30 12:42:14 +00:00
test_room.py Add missing type hints to tests.handlers. (#14680) 2022-12-16 11:53:01 +00:00
test_saml.py feat: Allow multiple values for SSO attribute_requirements via comma separation (#17949) 2025-02-10 15:36:21 +00:00
test_send_email.py Add email.tlsname config option (#17849) 2024-12-17 18:05:38 -06:00
test_sliding_sync.py Pass leave from remote invite rejection down Sliding Sync (#18375) 2025-05-08 14:28:23 +00:00
test_sso.py Update license headers 2023-11-21 15:29:58 -05:00
test_stats.py Update license headers 2023-11-21 15:29:58 -05:00
test_sync.py Fix join being denied after being invited over federation (#18075) 2025-01-27 11:21:10 -06:00
test_typing.py Refactor cache metrics to be homeserver-scoped (#18604) 2025-07-16 16:04:57 -05:00
test_user_directory.py Refactor cache metrics to be homeserver-scoped (#18604) 2025-07-16 16:04:57 -05:00
test_worker_lock.py Enable flake8-logging and flake8-logging-format rules in Ruff and fix related issues throughout the codebase (#18542) 2025-06-13 09:44:18 +02:00