From c17ad44ab8cb97433e68b5593f67d8672da0db4d Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 20 Oct 2026 03:09:21 +0200 Subject: replace snapshots by quarantine & replay --- src/compaction/switch.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/compaction/switch.rs') diff --git a/src/compaction/switch.rs b/src/compaction/switch.rs index 4093e7d..24bcee0 100644 --- a/src/compaction/switch.rs +++ b/src/compaction/switch.rs @@ -16,7 +16,7 @@ //! during steps 1-2. //! //! A node whose build doesn't match the committed epoch, or that never saw the commit, -//! fetches the new epoch from a peer instead (`catchup`). +//! rejoins the new epoch from peers instead (`catchup`). use std::time::Duration; @@ -70,6 +70,12 @@ async fn check(host: &H) { let local = host.current_epoch(); host.compaction().prune_archive(local.generation); + // While rejoining, the document is being filled from peers: its records are not + // complete enough to act on. + if host.compaction().is_rejoining() { + return catchup::check(host).await; + } + let all = host.read_doc(records::load_all).await; let local_record = EpochRecord::from(local); @@ -116,6 +122,7 @@ async fn check(host: &H) { switched_at: Some(unix_millis()), replayed_paths: Some(stats.replayed), failed_paths: Some(stats.failed), + quarantine: None, error: None, }, ); -- cgit v1.3.1