Files
synapse/rust
Matthew Hodgson b511f3bc35 Write a chunk in two round trips
The write transaction read six times between its writes, each read a
round trip: the room's depth, which events it already had, their
redactions, whether the prev events were persisted, the cache prefill's
rejections and redactions, and a cache stream ID. Now the rooms row of a
new room and the depth update are queued writes (the depth update
conditional, as Python's read made it), the three reads it still needs
go out together with eight cache stream IDs in one round trip behind
them, through the new WriteTxn::query_many, and the rest is known: the
cache prefill from the contexts and the redactions already read, and a
prev event the chunk itself persists needs no check. A chunk that
creates a room is written in two round trips instead of eight.

The createRoom bench gets a sane event cache, as the test default of one
entry made every read after persisting a fetch, which no server does.
2026-10-19 02:44:02 +01:00
..
2026-10-19 02:44:02 +01:00