Files
Matthew Hodgson 4e3e880bde Fewer round trips before and after the write
Before the write: the sliding sync step's three reads of the room go
out together on one connection, and the relevant state is read once,
not twice; the chain cover step pairs its two input reads, and the
chains' sequence numbers with their links, which are read for the
chains known before allocation since new chains have none; the read of
rejected and soft failed prev events leaves out the chunk's accepted
events, which it could not have found; and a room with no forward
extremities has no current state to read.

After it: get_current_state_deltas groups and budgets the deltas in one
statement, with window functions, so each handler's read is one round
trip in autocommit, and the stream_positions upsert runs in autocommit
too, from both persist paths. The twin test's fake background runner
passes keyword arguments on.
2026-10-19 03:18:08 +01:00
..