mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 17:47:28 +00:00
`FederationStore` ports the store methods the federation transmission loop calls around each transaction to the native Postgres driver: `get_new_device_msgs_for_remote`, `delete_device_msgs_for_remote`, `get_device_updates_by_remote` (with the cross-signing key updates and cross-signatures), `mark_as_sent_devices_by_remote` and `set_destination_last_successful_stream_ordering`. The stream change cache checks those start with are left to the caller. None of the writes has a Python cache to invalidate. The cross-signing reads skip Python's caches. `tests/storage/test_federation_store.py` runs each against the Python method on one database, through a `FederationStoreForTest` pyclass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R5b7Ruy4cgt27Mjq6Ptxbb