MatrixSynapse/tests/storage
Erik Johnston c72d26c1e1
Refactor `EventContext` (#12689)
Refactor how the `EventContext` class works, with the intention of reducing the amount of state we fetch from the DB during event processing.

The idea here is to get rid of the cached `current_state_ids` and `prev_state_ids` that live in the `EventContext`, and instead defer straight to the database (and its caching). 

One change that may have a noticeable effect is that we now no longer prefill the `get_current_state_ids` cache on a state change. However, that query is relatively light, since its just a case of reading a table from the DB (unlike fetching state at an event which is more heavyweight). For deployments with workers this cache isn't even used.


Part of #12684
2022-05-10 19:43:13 +00:00
..
databases Add a consistency check on events read from the database (#12620) 2022-05-03 21:27:52 +01:00
util Await un-partial-stating after a partial-state join (#12399) 2022-04-21 07:42:03 +01:00
__init__.py
test__base.py Optimise `_update_client_ips_batch_txn` to batch together database operations. (#12252) 2022-04-08 15:29:13 +01:00
test_account_data.py
test_appservice.py
test_background_update.py
test_base.py
test_cleanup_extrems.py
test_client_ips.py
test_database.py
test_devices.py Mark remote device list updates as already handled (#12557) 2022-04-26 17:07:21 +01:00
test_directory.py
test_e2e_room_keys.py
test_end_to_end_keys.py
test_event_chain.py Refactor `EventContext` (#12689) 2022-05-10 19:43:13 +00:00
test_event_federation.py Stop writing to `event_reference_hashes` (#12679) 2022-05-10 15:35:08 +01:00
test_event_metrics.py
test_event_push_actions.py
test_events.py
test_id_generators.py
test_keys.py
test_main.py
test_monthly_active_users.py Update mypy to 0.950 and fix complaints (#12650) 2022-05-06 12:35:20 +00:00
test_profile.py
test_purge.py
test_redaction.py
test_registration.py
test_rollback_worker.py
test_room.py
test_room_search.py
test_roommember.py Add type hints to some tests files (#12371) 2022-04-05 13:54:41 +01:00
test_state.py
test_stream.py Generate historic pagination token for `/messages` when no `?from` token provided (#12370) 2022-04-06 11:40:28 +01:00
test_transactions.py
test_txn_limit.py
test_unsafe_locale.py
test_user_directory.py