Files
synapse/rust
Erik JohnstonandClaude Opus 5.5 9bb82b20b4 Fix the prefetched cache stream IDs on retry and while in flight
A write transaction that failed after prefetching cache stream IDs
finished all of them, but left the unused ones spare. The retry handed
those out first, so it wrote cache invalidations at IDs below the
stream's position, which other workers never fetch. Finishing the
pending IDs now drops the spare ones too.

The prefetch also began its fetch only once the `nextval` rows were
back, so the position could pass an ID still on its way. It now begins
before the reads are sent, as `next_ids` does, and ends unallocated if
they fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PVLsNh6akt4ifEizY4D1ta
2026-10-19 08:09:21 +00:00
..