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/sharded.rs | |
parent | 393c4d4515e0cdadadc8de8ae2df12e4371cff88 (diff) | |
download | garage-33c8a489b0a9c0e869282bfc19c548f5a3e02e8c.tar.gz garage-33c8a489b0a9c0e869282bfc19c548f5a3e02e8c.zip |
layou: implement ack locking
Diffstat (limited to 'src/table/replication/sharded.rs')
-rw-r--r-- | src/table/replication/sharded.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/table/replication/sharded.rs b/src/table/replication/sharded.rs index 1320a189..2a16bc0c 100644 --- a/src/table/replication/sharded.rs +++ b/src/table/replication/sharded.rs @@ -25,6 +25,8 @@ pub struct TableShardedReplication { } impl TableReplication for TableShardedReplication { + type WriteSets = WriteLock<Vec<Vec<Uuid>>>; + fn storage_nodes(&self, hash: &Hash) -> Vec<Uuid> { self.system.cluster_layout().storage_nodes_of(hash) } @@ -36,8 +38,8 @@ impl TableReplication for TableShardedReplication { self.read_quorum } - fn write_sets(&self, hash: &Hash) -> Vec<Vec<Uuid>> { - self.system.cluster_layout().write_sets_of(hash) + fn write_sets(&self, hash: &Hash) -> Self::WriteSets { + self.system.layout_manager.write_sets_of(hash) } fn write_quorum(&self) -> usize { self.write_quorum |