Files
synapse/tests/storage
53bd383fe8 Report each stream's current position as a metric
When a stream advances in the database but stops being replicated to a
process, that process's view of the stream freezes. Requests that wait for
it to catch up to a token issued by another worker then time out and return
empty responses indefinitely (see #20080), and nothing exported said so.

Report `get_current_token` from every ID generator, on every process. The
value is comparable between processes, so a stream that has stopped
reaching one of them shows up as divergence with no client traffic needed.
It is also the position that `wait_for_stream_token` waits on, so its
divergence is the failure itself rather than a proxy for it.

Being a watermark over gapless runs of persisted IDs, it also catches a
single writer of a sharded stream going quiet, which a maximum across
writers would hide behind the writers still being replicated.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-12 14:32:14 +01:00
..
2014-08-12 15:10:52 +01:00
2025-09-30 11:27:29 -05:00