aboutsummaryrefslogtreecommitdiff
path: root/src/table/replication/parameters.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-11-14 14:28:16 +0100
committerAlex Auvolat <alex@adnab.me>2023-11-14 14:28:16 +0100
commit3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea (patch)
treef5448d44c7d5705c1e31912ca6d101c5998523ef /src/table/replication/parameters.rs
parent866196750fca74c1911ade2a90611f3663e60046 (diff)
downloadgarage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.tar.gz
garage-3b361d2959e3d577bdae6f8a5ccb0c9d5526b7ea.zip
layout: prepare for write sets
Diffstat (limited to 'src/table/replication/parameters.rs')
-rw-r--r--src/table/replication/parameters.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/table/replication/parameters.rs b/src/table/replication/parameters.rs
index 2a7d3585..2f842409 100644
--- a/src/table/replication/parameters.rs
+++ b/src/table/replication/parameters.rs
@@ -6,21 +6,23 @@ pub trait TableReplication: Send + Sync + 'static {
// See examples in table_sharded.rs and table_fullcopy.rs
// To understand various replication methods
+ /// The entire list of all nodes that store a partition
+ fn storage_nodes(&self, hash: &Hash) -> Vec<Uuid>;
+
/// Which nodes to send read requests to
fn read_nodes(&self, hash: &Hash) -> Vec<Uuid>;
/// Responses needed to consider a read succesfull
fn read_quorum(&self) -> usize;
/// Which nodes to send writes to
- fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>;
- /// Responses needed to consider a write succesfull
+ fn write_sets(&self, hash: &Hash) -> Vec<Vec<Uuid>>;
+ /// Responses needed to consider a write succesfull in each set
fn write_quorum(&self) -> usize;
fn max_write_errors(&self) -> usize;
// Accessing partitions, for Merkle tree & sync
/// Get partition for data with given hash
fn partition_of(&self, hash: &Hash) -> Partition;
-
/// List of partitions and nodes to sync with in current layout
fn sync_partitions(&self) -> SyncPartitions;
}