diff options
Diffstat (limited to 'src/table/replication')
-rw-r--r-- | src/table/replication/fullcopy.rs | 4 | ||||
-rw-r--r-- | src/table/replication/parameters.rs | 4 | ||||
-rw-r--r-- | src/table/replication/sharded.rs | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/table/replication/fullcopy.rs b/src/table/replication/fullcopy.rs index a6b4c98c..3ce7c0bf 100644 --- a/src/table/replication/fullcopy.rs +++ b/src/table/replication/fullcopy.rs @@ -19,14 +19,14 @@ pub struct TableFullReplication { } impl TableReplication for TableFullReplication { - fn read_nodes(&self, _hash: &Hash) -> Vec<UUID> { + fn read_nodes(&self, _hash: &Hash) -> Vec<Uuid> { vec![self.system.id] } fn read_quorum(&self) -> usize { 1 } - fn write_nodes(&self, _hash: &Hash) -> Vec<UUID> { + fn write_nodes(&self, _hash: &Hash) -> Vec<Uuid> { let ring = self.system.ring.borrow(); ring.config.members.keys().cloned().collect::<Vec<_>>() } diff --git a/src/table/replication/parameters.rs b/src/table/replication/parameters.rs index c2c78c8b..64996828 100644 --- a/src/table/replication/parameters.rs +++ b/src/table/replication/parameters.rs @@ -8,12 +8,12 @@ pub trait TableReplication: Send + Sync { // To understand various replication methods /// Which nodes to send read requests to - fn read_nodes(&self, hash: &Hash) -> Vec<UUID>; + 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>; + fn write_nodes(&self, hash: &Hash) -> Vec<Uuid>; /// Responses needed to consider a write succesfull fn write_quorum(&self) -> usize; fn max_write_errors(&self) -> usize; diff --git a/src/table/replication/sharded.rs b/src/table/replication/sharded.rs index f2d89729..93b95a38 100644 --- a/src/table/replication/sharded.rs +++ b/src/table/replication/sharded.rs @@ -25,7 +25,7 @@ pub struct TableShardedReplication { } impl TableReplication for TableShardedReplication { - fn read_nodes(&self, hash: &Hash) -> Vec<UUID> { + fn read_nodes(&self, hash: &Hash) -> Vec<Uuid> { let ring = self.system.ring.borrow().clone(); ring.walk_ring(&hash, self.replication_factor) } @@ -33,7 +33,7 @@ impl TableReplication for TableShardedReplication { self.read_quorum } - fn write_nodes(&self, hash: &Hash) -> Vec<UUID> { + fn write_nodes(&self, hash: &Hash) -> Vec<Uuid> { let ring = self.system.ring.borrow(); ring.walk_ring(&hash, self.replication_factor) } |