Files
Matthew Hodgson 93a6951858 Write push actions with the event, and drop the purge lock off the request
The push rule evaluator wrote each event's push actions to the staging
table, a round trip, for the persister to move into `event_push_actions`
in its transaction. It now leaves them on the event's context, as
`push_actions`, and the Rust persister writes them into
`event_push_actions` in the write transaction, queued behind the other
writes. The staging table stays for the persisters that read from it:
`stage_push_actions` writes the rows there before the Python persister
runs, and before a batch is sent to another worker.

The persist queue's read lock against purges was dropped with a round
trip the request waited for. Its row is now deleted in the background.
Waiters for the write lock retry on their own, so they lose nothing but
a few milliseconds.

The proxy's round trips per room for a room with an invite fall from 81
to 80, and the Python interactions from 14 to 13. The purge lock's two
round trips remain, one of them off the request now; so does
`store_room`, whose insert is also the room ID collision check.
2026-10-19 01:22:57 +01:00
..