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/compaction/switch.rs | |
| parent | 6ef01932cc08bdb1a514d30ab6fb3f131f38f4dc (diff) | |
replace snapshots by quarantine & replay
Diffstat (limited to 'src/compaction/switch.rs')
| -rw-r--r-- | src/compaction/switch.rs | 9 |
1 files changed, 8 insertions, 1 deletions
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<H: Host>(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<H: Host>(host: &H) { switched_at: Some(unix_millis()), replayed_paths: Some(stats.replayed), failed_paths: Some(stats.failed), + quarantine: None, error: None, }, ); |
