diff options
| author | tv <tv@krebsco.de> | 2026-11-01 19:35:20 +0100 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-01 19:35:20 +0100 |
| commit | 5640bacf735c6728acf4bc22217b0c07ac4bf7f9 (patch) | |
| tree | e1cdf1a912ca90d24d6a8100263edc0c5298305e /src/remake/local.rs | |
| parent | 2ac2b0e2b08f14be07c46b3fd9a516a64e9933fb (diff) | |
document: allow writes during rejoin
Diffstat (limited to 'src/remake/local.rs')
| -rw-r--r-- | src/remake/local.rs | 11 |
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, |
