aboutsummaryrefslogtreecommitdiffstats
path: root/src/document/file.rs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-01 19:35:20 +0100
committertv <tv@krebsco.de>2026-11-01 19:35:20 +0100
commit53eee8aa5a226d80af863895fef0bdc3daf7b627 (patch)
tree9066ce10cbde662f29263ca12397f6d61e7fbad4 /src/document/file.rs
parent266c0f57612e1930fe5d05768a18d87d4fe53977 (diff)
document: allow writes during rejoin
Diffstat (limited to 'src/document/file.rs')
-rw-r--r--src/document/file.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/document/file.rs b/src/document/file.rs
index 9efae42..3ea3afd 100644
--- a/src/document/file.rs
+++ b/src/document/file.rs
@@ -197,6 +197,11 @@ impl DocumentFile {
/// What is due for a document of `epoch` at `heads`, written by this node's `actors`
/// (see the module docs).
+ /// How many of this node's actors the file holds; None before it was written.
+ pub(crate) fn actors(&self) -> Option<usize> {
+ self.lock().as_ref().map(|written| written.actors)
+ }
+
pub(crate) fn due(&self, epoch: Epoch, actors: usize, heads: &[ChangeHash]) -> Due {
let written = self.lock().clone();
let reason = match &written {