From 5f2fdae1ea54b73eeb2352a28c6558b1e344e4e2 Mon Sep 17 00:00:00 2001 From: tv Date: Sun, 1 Nov 2026 13:37:04 +0100 Subject: remake: copy stale view when writes stop This ensures that stale reads show every write that was answered. --- src/remake/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/remake/mod.rs') diff --git a/src/remake/mod.rs b/src/remake/mod.rs index 04e9d8a..01e1e3e 100644 --- a/src/remake/mod.rs +++ b/src/remake/mod.rs @@ -197,6 +197,11 @@ pub(crate) trait Host: Clone + Send + Sync + 'static { /// ([`Host::switch_epoch`] with `writable` false). fn accept_writes(&self) -> impl Future + Send; + /// Stops taking writes (until [`Host::accept_writes`], or a swap that takes them) + /// and, with `copy`, returns a copy of the document as it is then, in one step: no + /// write is acknowledged that the copy lacks. + fn refuse_writes(&self, copy: bool) -> impl Future> + Send; + /// Applies a change downloaded from peers (`fetch_change`), then publishes it like /// a change received by sync. fn apply_change( -- cgit v1.3.1