layou: implement ack locking

This commit is contained in:
Alex Auvolat
2023-11-15 15:40:44 +01:00
parent 393c4d4515
commit 33c8a489b0
10 changed files with 157 additions and 47 deletions
+3 -1
View File
@@ -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;