This repository has no description

atproto: measure firehose lag from received events, not indexed ones

The node-wide "behind real time" mark was written only from handleIndexedOps, so it advanced only when a commit contained an op we index. Most of the stream is collections we skip, so a healthy node that had not indexed anything for a while logged an ever-growing "firehose is Nm behind real time" warning: it measured indexing activity, not the firehose's position. A dev node following a quiet relay could sit perfectly caught up and report minutes of lag. Mark the position in observeTime instead, which runs for every commit and identity before dedup on both transports, and is max-wins so a relay replaying history cannot drag it backwards past a fresher event from another relay. Drop the per-op mark from the indexing path. The monitor now reports a dry stream as dry rather than also claiming it is behind: with nothing arriving, the last event's age says nothing about our progress. "Behind" now means what it says -- we are receiving events whose stamps trail real time, i.e. a replay we have not caught up with.


Author Eli Mallon Date Commit Parent 104361aa
+87 -11
3 changed files
+87 -11
3 changed files