From 8f0b588831ac06913dd01a3ebd8bb523292d992e Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 3 Nov 2026 02:43:43 +0100 Subject: skip neighbours with our heads --- docs/measurements.md | 2 +- docs/peers.md | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/measurements.md b/docs/measurements.md index fb01de0..131adca 100644 --- a/docs/measurements.md +++ b/docs/measurements.md @@ -137,7 +137,7 @@ growing is the sign, and that writer's own `clock.off` ([`trust.md`](trust.md), clocks"). Writers aren't known by node (Automerge's actors are per run), so their skew can't be taken off too. With sane clocks: in a full mesh most changes land in the first buckets; in a partial mesh each hop adds about a round trip -plus the 200 ms announcement delay. Mass in the minutes buckets means changes arrive by +plus the announcement delay (200 to 400 ms). Mass in the minutes buckets means changes arrive by keepalive-triggered pulls rather than relay, i.e. announcements are being lost. ## Clocks diff --git a/docs/peers.md b/docs/peers.md index 9868c0e..a56ee62 100644 --- a/docs/peers.md +++ b/docs/peers.md @@ -282,7 +282,10 @@ Changes travel through a partial mesh by announcement and pull ([`swarm/relay.rs pushes its own writes to its neighbours; after applying changes from one neighbour it sends its other neighbours a STATUS with its new heads (marked as an announcement: no keepalive, and answered only by a neighbour whose heads differ, so one that has the -changes already sends nothing back), and a neighbour that lacks those heads pulls them (it sets them as the peer's heads in its sync state, so Automerge asks +changes already sends nothing back; nor is a neighbour told whose latest heads, as its +own announcement or STATUS brought them, are this node's: announcements wait 200 to +400 ms, at random, so of two neighbours with the same news one is usually first, and +the other skips it), and a neighbour that lacks those heads pulls them (it sets them as the peer's heads in its sync state, so Automerge asks for what's missing). It pulls from one neighbour at a time (15 s timeout); neighbours that announce heads it lacks meanwhile wait their turn and are pulled from as soon as the current pull is answered, if they still have something it lacks. The regular -- cgit v1.3.1