aboutsummaryrefslogtreecommitdiff
path: root/src/table/replication/fullcopy.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-03-26 19:41:46 +0100
committerAlex Auvolat <alex@adnab.me>2021-04-27 16:37:10 +0200
commitb4376108122bb09bd8cff562b718967d4332ffbe (patch)
tree120910caa43e400c0431463f47ed3fc114af77ea /src/table/replication/fullcopy.rs
parentf8716895715b1a552750062aca9bc1882f6f95c0 (diff)
downloadgarage-b4376108122bb09bd8cff562b718967d4332ffbe.tar.gz
garage-b4376108122bb09bd8cff562b718967d4332ffbe.zip
attempt at documenting table crate
Diffstat (limited to 'src/table/replication/fullcopy.rs')
-rw-r--r--src/table/replication/fullcopy.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/table/replication/fullcopy.rs b/src/table/replication/fullcopy.rs
index bd658f63..a6b4c98c 100644
--- a/src/table/replication/fullcopy.rs
+++ b/src/table/replication/fullcopy.rs
@@ -6,19 +6,19 @@ use garage_util::data::*;
use crate::replication::*;
+/// Full replication schema: all nodes store everything
+/// Writes are disseminated in an epidemic manner in the network
+/// Advantage: do all reads locally, extremely fast
+/// Inconvenient: only suitable to reasonably small tables
#[derive(Clone)]
pub struct TableFullReplication {
+ /// The membership manager of this node
pub system: Arc<System>,
+ /// Max number of faults allowed while replicating a record
pub max_faults: usize,
}
impl TableReplication for TableFullReplication {
- // Full replication schema: all nodes store everything
- // Writes are disseminated in an epidemic manner in the network
-
- // Advantage: do all reads locally, extremely fast
- // Inconvenient: only suitable to reasonably small tables
-
fn read_nodes(&self, _hash: &Hash) -> Vec<UUID> {
vec![self.system.id]
}