aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/ring.rs
diff options
context:
space:
mode:
authorTrinity Pointard <trinity.pointard@gmail.com>2021-04-06 05:25:28 +0200
committerTrinity Pointard <trinity.pointard@gmail.com>2021-04-06 05:28:47 +0200
commitc8906f200bf907272bf9fba7d183df4332fa085b (patch)
tree68aea7345bd95761f016976fbf0c183bee1e7092 /src/rpc/ring.rs
parent653d3d588f912bcf86b24c456f23d6db0ca755d8 (diff)
downloadgarage-c8906f200bf907272bf9fba7d183df4332fa085b.tar.gz
garage-c8906f200bf907272bf9fba7d183df4332fa085b.zip
make most requested changes
Diffstat (limited to 'src/rpc/ring.rs')
-rw-r--r--src/rpc/ring.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rpc/ring.rs b/src/rpc/ring.rs
index 6f341fa8..04f8b590 100644
--- a/src/rpc/ring.rs
+++ b/src/rpc/ring.rs
@@ -1,4 +1,5 @@
//! Module containing types related to computing nodes which should receive a copy of data blocks
+//! and metadata
use std::collections::{HashMap, HashSet};
use std::convert::TryInto;
@@ -197,7 +198,7 @@ impl Ring {
top >> (16 - PARTITION_BITS)
}
- /// Get the list of partitions and
+ /// Get the list of partitions and the first hash of a partition key that would fall in it
pub fn partitions(&self) -> Vec<(Partition, Hash)> {
let mut ret = vec![];
@@ -211,6 +212,7 @@ impl Ring {
ret
}
+ // TODO rename this function as it no longer walk the ring
/// Walk the ring to find the n servers in which data should be replicated
pub fn walk_ring(&self, from: &Hash, n: usize) -> Vec<UUID> {
if self.ring.len() != 1 << PARTITION_BITS {