mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 15:37:49 +00:00
`_update_current_state`, the queue's `_UpdateCurrentStateTask`, becomes one call to `Persister.update_current_state`: - `calculate_current_state` reads the room's forward extremities (its state DAG extremities in an MSC4242 room) and takes the state of their one state group, or resolves several, after checking the groups still exist and putting off their deletion, as `resolve_state_groups` does. - The delta from the current state and the sliding sync table changes are computed as for a chunk, with no events. - If anything changed, one stream ID is taken from the events stream, as `get_next` does, and `_update_current_state_txn` runs in Rust. Python applies the effects, which finishes the ID. A room on state resolution v1 whose extremities need resolving is handed back, and Python recalculates its state as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LXMkcZVkcZhi21augBff4a