aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm/sync.rs
Commit message (Collapse)AuthorAgeFilesLines
* use Automerge as Document instead of AutoCommittv3 days1-5/+5
| | | | This allows a lot of operations to drop mut.
* move SyncSession to documenttv3 days1-1/+1
|
* move all automerge references to documenttv3 days1-14/+6
|
* move changes as bytes to documenttv3 days1-4/+1
|
* sync messages are bytes outside the sessiontv3 days1-3/+2
| | | | | | | | SyncPayload is now an opaque byte container in transport. SyncSession::generate returns the encoded payload, state::decode_sync(&payload) decodes it off the document lock (as before), and receive takes the decoded message, which is a type only the session can open. transport/mod.rs no longer imports Automerge.
* propagate clock figurestv3 days1-1/+4
|
* unify usage of is_dormanttv3 days1-2/+2
|
* unify request_sync logictv4 days1-21/+5
|
* move change publisher to own moduletv4 days1-81/+0
|
* move ChangeSet from swarm to documenttv4 days1-10/+1
|
* cleanup log messagestv6 days1-8/+8
|
* talk about "transport" unless mycelium is meanttv8 days1-3/+7
|
* reject and warn about too large delta blobstv8 days1-0/+5
|
* add delta blobstv8 days1-5/+116
|
* decode sync messages lazilytv8 days1-1/+3
| | | | | | | Sync messages are now being decoded only where they are applied: after membership has been checked, in the sync lane's blocking task. Debug now shows only the size instead of the whole message.
* add pull queuetv8 days1-2/+4
|
* send sync messages off workertv8 days1-1/+23
|
* add session IDstv8 days1-15/+23
| | | | | This prevents the regenerate flag from being lost across reset_sync during an in-flight send.
* wrap unix timestamps in newtypetv8 days1-1/+1
|
* SyncSessions owns Automerge's sync statetv9 days1-78/+11
|
* unify lock logictv9 days1-2/+2
|
* add clock moduletv9 days1-1/+2
| | | | | The Clock module is the system clock that every unix timestamp new goes through. It comes with an offset that only tests can set.
* recompute neighbours whenever topology changestv9 days1-0/+7
|
* late messages don't flip peer's epoch backtv9 days1-3/+4
|
* cache headstv10 days1-2/+3
| | | | To reduce the number of write locks, heads are now cached.
* being caught up needs some headstv10 days1-5/+9
| | | | | | | | | | | A sync message from a ready peer only completes the initial sync if that peer has at least one head. A peer with an empty document can no longer make a joiner ready on an empty store: a misconfigured second swarm, or a genesis node in its first seconds. Effect on a brand-new swarm: a joiner now waits until the genesis node has registered itself in the member list, which happens within about 5 s of it becoming ready.
* add chunked download and use it during rejointv10 days1-0/+6
|
* add throughput statstv10 days1-1/+18
|
* add propagation statstv10 days1-0/+15
|
* add swarm statstv10 days1-1/+7
|
* pull missing changestv11 days1-5/+14
| | | | | | Nodes push changes to their neighbours but don't relay them directly. In a partial mesh, nodes can learn about missing changes via keepalive messages and can pull them from their neighbours.
* sync with neighbourstv11 days1-1/+13
|
* retry using fresh messagestv11 days1-158/+127
| | | | | Don't store encoded messages but retry using a newly generated one. That way any accumulated changes can be delivered at once.
* drop stall breaker; resend needed changestv11 days1-65/+21
| | | | | | The stall breaker was superseded by regular re-handshaking Re-handshaking also gets triggered, when a node needs some of the heads its peer believes it has already sent. In that case the peer now resends what's needed.
* both sides may open sync after resettv11 days1-19/+8
| | | | | | | | | | Ready nodes will leave the first message to the pear that isn't ready. Hello and hello reply now carry ready, so readiness is known from the very first contact, before any sync. Together with the sync messages and keepalives, reports_ready is always current. After epoch switch, pings go to everyone except ready members already on the new epoch, these learn from the lagging peer's opening.
* perform handshake in one round triptv11 days1-1/+0
|
* drop pre-membership sync messagestv11 days1-16/+4
| | | | | The handshake resets the session anyway, and the sender's reply timeout resends what still matters.
* probe sync source during catch-uptv11 days1-105/+6
| | | | This allows changing sources without the fixed 30 s stall duration.
* use only ready peers as sync sourcetv11 days1-11/+52
| | | | | | Sync messages now carries a ready flag, telling whether the sending peer itself is joined or is itself still (re-)joining. In the latter case, the peer won't be used as sync source.
* catch up with a single source onlytv11 days1-1/+86
|
* record the cause that started a sync sessiontv11 days1-1/+10
|
* merge sync_reset_at and epoch_unannounced into openingtv11 days1-6/+1
|
* introduce sync sessiontv11 days1-26/+32
| | | | SyncSession holds all fields that get reset by reset_sync()
* merge membership and authenticate into standingtv11 days1-6/+6
|
* announce epochs by sync instead of pingtv11 days1-0/+4
|
* pick pair leader by hash instead of key ordertv11 days1-1/+1
|
* open sync only from one sidetv11 days1-3/+21
| | | | | | | | | If both sides open, the openings cross, and an empty node's answer to the other opening (empty heads) makes the other side send the whole document a second time. Now after a sync reset, only the side with the smaller public key opens the sync; the other answers it, or opens itself if nothing arrives.
* don't resend sync messages to up-to-date peerstv12 days1-3/+13
| | | | | | | | | | | When an sync messages arrives and automerge has nothing to say about it, then no reply is generated. With c9279e4 it was assumed that every sync message gets an answer, so missing replies caused unnecessary resends. Now a reply is only awaited if the peer's last reported heads differ from ours. If the peer's heads become equal through a third peer without replying, the waiting will also abort if a ping or pong showss the same heads digest on both sides.
* rename cluster to swarm everywhere!tv13 days1-21/+21
|
* resend sync messages that haven't been repliedtv13 days1-4/+13
|