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
committerTrinity Pointard <trinity.pointard@gmail.com>2021-04-06 05:26:48 +0200
commit30bec0758b943351d946234329b9a46bd83749a1 (patch)
tree120910caa43e400c0431463f47ed3fc114af77ea /src/table/replication/fullcopy.rs
parentb476b702c8a1e4027a1abc16d54afbd61fdcf984 (diff)
downloadgarage-30bec0758b943351d946234329b9a46bd83749a1.tar.gz
garage-30bec0758b943351d946234329b9a46bd83749a1.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]
}