diff options
author | Alex Auvolat <alex@adnab.me> | 2023-11-15 15:40:44 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2023-11-15 15:40:44 +0100 |
commit | 33c8a489b0a9c0e869282bfc19c548f5a3e02e8c (patch) | |
tree | 5bfe599b2ce2c0e558d9fb244647eccda9164f88 /src/table/replication/parameters.rs | |
parent | 393c4d4515e0cdadadc8de8ae2df12e4371cff88 (diff) | |
download | garage-33c8a489b0a9c0e869282bfc19c548f5a3e02e8c.tar.gz garage-33c8a489b0a9c0e869282bfc19c548f5a3e02e8c.zip |
layou: implement ack locking
Diffstat (limited to 'src/table/replication/parameters.rs')
-rw-r--r-- | src/table/replication/parameters.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/table/replication/parameters.rs b/src/table/replication/parameters.rs index 2f842409..a4e701bb 100644 --- a/src/table/replication/parameters.rs +++ b/src/table/replication/parameters.rs @@ -3,6 +3,8 @@ use garage_util::data::*; /// Trait to describe how a table shall be replicated pub trait TableReplication: Send + Sync + 'static { + type WriteSets: AsRef<Vec<Vec<Uuid>>> + Send + Sync + 'static; + // See examples in table_sharded.rs and table_fullcopy.rs // To understand various replication methods @@ -15,7 +17,7 @@ pub trait TableReplication: Send + Sync + 'static { fn read_quorum(&self) -> usize; /// Which nodes to send writes to - fn write_sets(&self, hash: &Hash) -> Vec<Vec<Uuid>>; + fn write_sets(&self, hash: &Hash) -> Self::WriteSets; /// Responses needed to consider a write succesfull in each set fn write_quorum(&self) -> usize; fn max_write_errors(&self) -> usize; |