mirror of
https://github.com/element-hq/synapse.git
synced 2026-11-04 19:57:45 +00:00
Preparing a chunk worked out the state, then the chain cover index, and the batch then marked its state groups as persisting: each one waited for the one before, though none uses another's result. The chain cover index, a transaction of its own of about six round trips, is now worked out at the same time as the state and the sliding sync changes, on its own connection. Marking the state groups runs at the same time as preparing. A state error or a fallback to Python is reported as before, ahead of anything the other step found. If the chunk is handed back to Python, a mark that went ahead is released as a failure: that only pushes back any pending deletion of the groups, as Python's own failure path would, and a failure to release is logged rather than failing the hand-back. The chain cover index is worked out even when the state step then falls back, which costs chain IDs and can leave a row in `event_auth_chain_to_calculate` that Python's persist of the chunk writes and clears again. The E2EE monitor's room on jki.re now waits on about 44 round trips in turn, from about 60. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PVLsNh6akt4ifEizY4D1ta