diff options
| author | tv <tv@krebsco.de> | 2026-10-20 03:09:21 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-20 06:12:35 +0200 |
| commit | c17ad44ab8cb97433e68b5593f67d8672da0db4d (patch) | |
| tree | ef06ca240459df4ffa4d34fa19c2b1ad4f7dc1ff /src/peer.rs | |
| parent | 6ef01932cc08bdb1a514d30ab6fb3f131f38f4dc (diff) | |
replace snapshots by quarantine & replay
Diffstat (limited to 'src/peer.rs')
| -rw-r--r-- | src/peer.rs | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/peer.rs b/src/peer.rs index 50460b0..54ba0a4 100644 --- a/src/peer.rs +++ b/src/peer.rs @@ -537,13 +537,22 @@ async fn observe_peer_epoch(state: &AppState, peer: &str, remote: Epoch) -> bool .send(SyncEvent::PeerNeedsSync(peer.to_owned())); } } - other => { + // Expected after a compaction: either side switches or catches up. + EpochRelation::PeerAhead | EpochRelation::PeerBehind => { + info!( + peer = %peer, + local_epoch = %local, + peer_epoch = %remote, + relation = ?relation, + "Peer is on another epoch; not syncing with it until both are on the same" + ); + } + EpochRelation::Diverged => { warn!( peer = %peer, local_epoch = %local, peer_epoch = %remote, - relation = ?other, - "Peer is on a different epoch; not syncing with it" + "Peer is on a different epoch of the same generation; not syncing with it" ); } } @@ -663,17 +672,6 @@ pub(crate) async fn handle_message( let local = local_keepalive(state).await; heal_if_diverged(state, &peer, &local, &remote).await; } - transport::ParsedMessage::SnapshotRequest(request) => { - // Saving a large document takes a while; don't stall the inbox. - tokio::spawn(crate::compaction::serve_snapshot( - state.clone(), - peer.clone(), - request, - )); - } - transport::ParsedMessage::SnapshotReply(reply) => { - crate::compaction::receive_snapshot_reply(state, &peer, reply); - } } Ok(()) |
