synapse/synapse/config
Erik Johnston 5c9e39e619
Track device list updates per room. (#12321)
This is a first step in dealing with #7721.

The idea is basically that rather than calculating the full set of users a device list update needs to be sent to up front, we instead simply record the rooms the user was in at the time of the change. This will allow a few things:

1. we can defer calculating the set of remote servers that need to be poked about the change; and
2. during `/sync` and `/keys/changes` we can avoid also avoid calculating users who share rooms with other users, and instead just look at the rooms that have changed.

However, care needs to be taken to correctly handle server downgrades. As such this PR writes to both `device_lists_changes_in_room` and the `device_lists_outbound_pokes` table synchronously. In a future release we can then bump the database schema compat version to `69` and then we can assume that the new `device_lists_changes_in_room` exists and is handled.

There is a temporary option to disable writing to `device_lists_outbound_pokes` synchronously, allowing us to test the new code path does work (and by implication upgrading to a future release and downgrading to this one will work correctly).

Note: Ideally we'd do the calculation of room to servers on a worker (e.g. the background worker), but currently only master can write to the `device_list_outbound_pokes` table.
2022-04-04 15:25:20 +01:00
..
__init__.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
__main__.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
_base.py Move scripts directory inside synapse, exposing as setuptools entry_points (#12118) 2022-03-02 13:00:16 +00:00
_base.pyi Add config settings for background update parameters (#11980) 2022-03-11 10:46:45 -08:00
_util.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
account_validity.py Default value for public_baseurl (#11210) 2021-11-08 14:13:10 +00:00
api.py Fix up docs for track_puppeted_user_ips (again) (#11757) 2022-01-17 14:55:30 +00:00
appservice.py Send device list updates to application services (MSC3202) - part 1 (#11881) 2022-03-30 14:39:27 +01:00
auth.py Fix copy-paste error in the password section of the sample-config. (#10804) 2021-09-13 08:58:34 -04:00
background_updates.py Add config settings for background update parameters (#11980) 2022-03-11 10:46:45 -08:00
cache.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
captcha.py Clean-up the template loading code. (#9200) 2021-01-27 10:59:50 -05:00
cas.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
consent.py Use direct references for some configuration variables (part 3) (#10885) 2021-09-23 07:13:34 -04:00
database.py Refuse to start if DB has an unsafe locale (#12262) 2022-03-23 10:23:05 -07:00
emailconfig.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
experimental.py Move MSC2654 support behind an experimental configuration flag. (#12295) 2022-03-31 15:05:13 -04:00
federation.py Use inline type hints in various other places (in synapse/) (#10380) 2021-07-15 11:02:43 +01:00
groups.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
homeserver.py Add config settings for background update parameters (#11980) 2022-03-11 10:46:45 -08:00
jwt.py Add config for customizing the claim used for JWT logins. (#11361) 2021-11-22 13:01:03 -05:00
key.py Fix typechecker problems exposed by signedjson 1.1.2 (#12326) 2022-03-29 21:37:50 +00:00
logger.py Remove support for the legacy structured logging configuration. (#12008) 2022-02-17 13:32:18 +00:00
metrics.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
modules.py Fix some indentation inconsistencies in the sample config (modules) (#11838) 2022-01-27 10:06:29 +00:00
oembed.py Request JSON for oEmbed requests (and ignore XML only providers). (#10759) 2021-09-08 07:17:52 -04:00
oidc.py Implement a Jinja2 filter to extract localparts from email addresses (#12212) 2022-03-11 15:15:11 +00:00
password_auth_providers.py Port the Password Auth Providers module interface to the new generic interface (#10548) 2021-10-13 11:21:52 +00:00
push.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
ratelimiting.py Add a ratelimiter for 3pid invite (#11892) 2022-02-03 14:28:15 +01:00
redis.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
registration.py Add restrictions by default to open registration in Synapse (#12091) 2022-03-25 10:11:01 -07:00
repository.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
retention.py Move experimental & retention config out of the server module. (#11070) 2021-10-15 14:30:48 +00:00
room.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
room_directory.py Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 (#11687) 2022-01-05 11:41:49 +00:00
saml2.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
server.py Track device list updates per room. (#12321) 2022-04-04 15:25:20 +01:00
server_notices.py Require direct references to configuration variables. (#10985) 2021-10-06 10:47:41 -04:00
spam_checker.py Fix dead link in spam checker warning (#12231) 2022-03-16 13:52:59 +00:00
sso.py Additional type hints for config module. (#11465) 2021-12-01 07:28:23 -05:00
stats.py Remove functionality associated with unused historical stats tables (#9721) 2021-07-08 16:57:13 +01:00
third_party_event_rules.py Port the ThirdPartyEventRules module interface to the new generic interface (#10386) 2021-07-20 12:39:46 +02:00
tls.py Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 (#11687) 2022-01-05 11:41:49 +00:00
tracer.py Use importlib.metadata to read requirements (#12088) 2022-03-01 17:44:41 +00:00
user_directory.py Add an admin API to run background jobs. (#11352) 2021-11-19 19:39:46 +00:00
voip.py Add config linting script that checks for bool casing (#6203) 2019-10-23 13:22:54 +01:00
workers.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00