summaryrefslogtreecommitdiffstats
path: root/src/peer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/peer.rs')
-rw-r--r--src/peer.rs26
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(())