forked-synapse/synapse/storage
Patrick Cloke 5e024a0645
Modify StoreKeyFetcher to read from server_keys_json. (#15417)
Before this change:

* `PerspectivesKeyFetcher` and `ServerKeyFetcher` write to `server_keys_json`.
* `PerspectivesKeyFetcher` also writes to `server_signature_keys`.
* `StoreKeyFetcher` reads from `server_signature_keys`.

After this change:

* `PerspectivesKeyFetcher` and `ServerKeyFetcher` write to `server_keys_json`.
* `PerspectivesKeyFetcher` also writes to `server_signature_keys`.
* `StoreKeyFetcher` reads from `server_keys_json`.

This results in `StoreKeyFetcher` now using the results from `ServerKeyFetcher`
in addition to those from `PerspectivesKeyFetcher`, i.e. keys which are directly
fetched from a server will now be pulled from the database instead of refetched.

An additional minor change is included to avoid creating a `PerspectivesKeyFetcher`
(and checking it) if no `trusted_key_servers` are configured.

The overall impact of this should be better usage of cached results:

* If a server has no trusted key servers configured then it should reduce how often keys
  are fetched.
* if a server's trusted key server does not have a requested server's keys cached then it
  should reduce how often keys are directly fetched.
2023-04-20 12:30:32 -04:00
..
controllers Include the room ID in more purge room log lines. (#15222) 2023-03-08 20:08:56 +00:00
databases Modify StoreKeyFetcher to read from server_keys_json. (#15417) 2023-04-20 12:30:32 -04:00
engines Speed up SQLite unit test CI (#15334) 2023-03-30 16:21:12 +01:00
schema Delete server-side backup keys when deactivating an account. (#15181) 2023-04-04 20:16:08 +00:00
util Combine AbstractStreamIdTracker and AbstractStreamIdGenerator. (#15192) 2023-03-03 08:13:37 -05:00
__init__.py Rename storage classes (#12913) 2022-05-31 12:17:50 +00:00
_base.py Add final type hint to synapse.server. (#15035) 2023-02-09 09:49:04 -05:00
background_updates.py Handle half-created indices in receipts index background update (#14650) 2022-12-09 23:02:11 +00:00
database.py More precise type for LoggingTransaction.execute (#15432) 2023-04-14 18:04:49 +00:00
keys.py Use auto_attribs/native type hints for attrs classes. (#11692) 2022-01-13 13:49:28 +00:00
prepare_database.py Bump black from 22.12.0 to 23.1.0 (#15103) 2023-02-22 15:29:09 -05:00
push_rule.py Remove redundant "coding: utf-8" lines (#9786) 2021-04-14 15:34:27 +01:00
roommember.py Do not include rooms with an unknown room version in a sync response. (#10644) 2021-08-19 11:12:55 -04:00
types.py More precise type for LoggingTransaction.execute (#15432) 2023-04-14 18:04:49 +00:00