aboutsummaryrefslogtreecommitdiffstats
path: root/src/remake/local.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/remake/local.rs')
-rw-r--r--src/remake/local.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/remake/local.rs b/src/remake/local.rs
index 7810690..e94657c 100644
--- a/src/remake/local.rs
+++ b/src/remake/local.rs
@@ -9,7 +9,6 @@ use std::collections::{HashMap, HashSet};
use std::sync::{Arc, Mutex, MutexGuard};
use std::time::Duration;
-use automerge::{ActorId, AutoCommit};
use serde::Serialize;
use tokio::time::Instant;
@@ -17,6 +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::locks::MutexExt;
pub(crate) struct RemakeState {
@@ -85,7 +85,7 @@ 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: AutoCommit,
+ pub(crate) old: Document,
pub(crate) started: Instant,
/// The node served requests before; it does again once the rejoin is over.
pub(crate) was_ready: bool,
@@ -102,7 +102,7 @@ pub(crate) struct Quarantined {
/// Store paths the changes touched (minimal, prefix-free).
pub(crate) paths: Vec<Vec<String>>,
/// The old document; `paths` are read from its merged view.
- pub(crate) document: AutoCommit,
+ pub(crate) document: Document,
}
#[derive(Clone, Debug, Serialize)]
@@ -138,7 +138,7 @@ struct Archived {
epoch: Epoch,
// Kept for auditing and recovery by hand; not read by the protocol.
#[allow(dead_code)]
- doc: AutoCommit,
+ doc: Document,
archived_at: UnixMillis,
retention: Retention,
}
@@ -249,7 +249,7 @@ impl RemakeState {
pub(crate) fn archive(
&self,
epoch: Epoch,
- doc: AutoCommit,
+ doc: Document,
retention: Retention,
current_generation: u64,
now: UnixMillis,
@@ -431,7 +431,7 @@ mod tests {
// Kept by epoch count only.
remake.archive(
epoch(0),
- AutoCommit::new(),
+ Document::new(),
Retention {
epochs: Some(1),
age_ms: None,
@@ -446,7 +446,7 @@ mod tests {
// Kept by time while the epoch count has passed.
remake.archive(
epoch(1),
- AutoCommit::new(),
+ Document::new(),
Retention {
epochs: Some(0),
age_ms: Some(3_600_000),
@@ -459,7 +459,7 @@ mod tests {
// No limits at all: not kept.
remake.archive(
epoch(2),
- AutoCommit::new(),
+ Document::new(),
Retention {
epochs: None,
age_ms: None,