diff options
Diffstat (limited to 'src/remake/switch.rs')
| -rw-r--r-- | src/remake/switch.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/remake/switch.rs b/src/remake/switch.rs index 94956f6..657b0f5 100644 --- a/src/remake/switch.rs +++ b/src/remake/switch.rs @@ -297,6 +297,17 @@ async fn switch<H: Host>( &old, std::mem::take(&mut stats.quarantined), ); + // 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 + }; host.remake().archive( previous, old, |
