diff options
| author | tv <tv@krebsco.de> | 2026-11-01 13:37:04 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 13:37:04 +0100 |
| commit | 885da82bb0d169f995598e0ba7c75523b1f98080 (patch) | |
| tree | 6c387f78946d8661a544da2185d92fe751c87761 /src/remake/mod.rs | |
| parent | 1202c0ba9bf49e7e31492c90b37af3e6c91b98b7 (diff) | |
remake: copy stale view when writes stop
This ensures that stale reads show every write that was answered.
Diffstat (limited to 'src/remake/mod.rs')
| -rw-r--r-- | src/remake/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
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<Output = ()> + 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<Output = Option<Document>> + Send; + /// Applies a change downloaded from peers (`fetch_change`), then publishes it like /// a change received by sync. fn apply_change( |
