diff options
| author | tv <tv@krebsco.de> | 2026-10-21 03:56:31 +0200 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-10-21 03:56:31 +0200 |
| commit | 031f47bd6228dbb0ea5ab4022d9ca52b302f2dae (patch) | |
| tree | c1d1ef4a44bd640765305b994725420ae6b1cb56 /src/document | |
| parent | 215735c94b57fc190ec2adc77f9af500c00f0d41 (diff) | |
rename compaction to remake
Diffstat (limited to 'src/document')
| -rw-r--r-- | src/document/replica.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/document/replica.rs b/src/document/replica.rs index 4579029..ff3af4c 100644 --- a/src/document/replica.rs +++ b/src/document/replica.rs @@ -1,7 +1,7 @@ //! The local replica: the Automerge document together with the epoch it belongs to. //! -//! Compaction (later steps) replaces the document with a snapshot whose history is -//! unrelated to the old one. Syncing two unrelated histories would make Automerge merge +//! A remake replaces the document with a new one (for compaction: a snapshot) whose +//! history is unrelated to the old one. Syncing two unrelated histories would make Automerge merge //! them, turning every key into a conflict with its own copy, so nodes on different //! epochs must never sync. Keeping the epoch and the document under one lock makes it //! impossible to label a sync message from one document with the other's epoch. @@ -13,10 +13,10 @@ use automerge::AutoCommit; /// One generation of the cluster document. /// -/// * `generation` orders epochs: every compaction increments it, so a node can tell +/// * `generation` orders epochs: every remake increments it, so a node can tell /// whether a peer is behind or ahead. /// * `id` is the hash of the epoch's snapshot change. It tells two epochs of the same -/// generation apart, which only happens if two compactions committed concurrently. +/// generation apart, which only happens if two remakes committed concurrently. #[derive(Clone, Copy, PartialEq, Eq, Hash)] pub struct Epoch { pub generation: u64, @@ -31,7 +31,7 @@ pub enum EpochRelation { PeerBehind, /// The peer is on a newer generation; we have to migrate. PeerAhead, - /// Same generation, different snapshot: competing compactions. Never sync. + /// Same generation, different snapshot: competing remakes. Never sync. Diverged, } |
