aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/local.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
commit5640bacf735c6728acf4bc22217b0c07ac4bf7f9 (patch)
treee1cdf1a912ca90d24d6a8100263edc0c5298305e /src/remake/local.rs
parent2ac2b0e2b08f14be07c46b3fd9a516a64e9933fb (diff)
document: allow writes during rejoin
Diffstat (limited to 'src/remake/local.rs')
-rw-r--r--src/remake/local.rs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/remake/local.rs b/src/remake/local.rs
index e8fc9eb..ce133ec 100644
--- a/src/remake/local.rs
+++ b/src/remake/local.rs
@@ -16,7 +16,7 @@ use super::records::Retention;
use super::snapshot::Snapshot;
use crate::clock::UnixMillis;
use crate::document::replica::Epoch;
-use crate::document::{ActorId, Document};
+use crate::document::{ActorId, ChangeHash, Document};
use crate::locks::MutexExt;
pub(crate) struct RemakeState {
@@ -87,8 +87,13 @@ pub(crate) struct CatchUp {
pub(crate) struct Rejoin {
pub(crate) previous: Epoch,
pub(crate) target: Epoch,
- /// The document of `previous`, until it is replayed, quarantined or restored.
- pub(crate) old: Document,
+ /// The document of `previous`, until it is replayed, quarantined or restored; of a
+ /// node that was ready, kept by the node instead, where it takes its writes
+ /// meanwhile (`Host::begin_rejoin`).
+ pub(crate) old: Option<Document>,
+ /// That document's heads as the rejoin began: the changes after them it took
+ /// during the rejoin.
+ pub(crate) heads: Vec<ChangeHash>,
pub(crate) started: Instant,
/// The node served requests before; it does again once the rejoin is over.
pub(crate) was_ready: bool,