diff options
| author | tv <tv@krebsco.de> | 2026-11-17 04:10:55 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-17 05:33:11 +0100 |
| commit | 171f1fcabcdb62b93696f5028120e9d5390b118a (patch) | |
| tree | f934a5d25ff7fda8417545db999540b02bb486fa /src/remake/catchup.rs | |
| parent | b88b3abffceb3f91bb5bee08d9b1889a41e7b852 (diff) | |
remake: holding a store, a node puts again what the document it left holds
After a switch or a rejoin, a node of a swarm holding a store puts again
what the document it left holds that a store starting at the new document's
checkpoint takes, by its own refusals and drops, and the new one lacks
(`docs/store.md`, Remakes, `Holding::left`): what it held beyond the base,
and, where it moved to a later checkpoint since, what a store starting at
the snapshot's takes to reach it. Its events aren't replayed into the new
document, so none nobody takes go along.
Diffstat (limited to 'src/remake/catchup.rs')
| -rw-r--r-- | src/remake/catchup.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/remake/catchup.rs b/src/remake/catchup.rs index 35add67..e7184be 100644 --- a/src/remake/catchup.rs +++ b/src/remake/catchup.rs @@ -460,6 +460,17 @@ async fn finish<H: Host>(host: &H) { }) .await; let quarantine_id = quarantine::add(host, previous, target, &old, unplaced); + // Holding a store: what the old document holds that the new one's store takes goes + // again (`Holding::left`). + #[cfg(feature = "federation")] + let old = { + let holding = host.holding(); + host.read_doc(move |doc| { + holding.left(doc, &old); + old + }) + .await + }; // Unless the quarantine holds the document. if !old.get_heads().is_empty() && !quarantined_whole { |
