mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 15:37:49 +00:00
In `rust_sliding_sync: on` mode, `current_sync_for_user` is now four Rust calls around the Python extensions: load the connection state, compute the interested rooms (the port of `_compute_interested_rooms_new_tables`), compute the rooms, and finish the request (unsent and sent rooms, then the persist). The connection state is a Rust pyclass. The extensions read and update it through views with the surface of Python's `PerConnectionState` and `MutablePerConnectionState`. Receipts tokens stay in their database form in Rust and become `MultiWriterStreamToken`s only when Python asks. The whole request falls back to Python when the sliding sync tables are not filled, for a filter Python does not implement either, and on any Rust error. Rooms Rust leaves to Python run `get_room_sync_data` over a Python copy of their slice of the state. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L51DoxB8VnH8UjXJFDgpNG