aboutsummaryrefslogtreecommitdiff
path: root/src/table/replication/sharded.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-11 18:28:03 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-11 18:28:27 +0100
commit046b649bcc3b147140fc2b0af0e071d3dd1b2c8d (patch)
treef23ea651237ffce9f3aca3a2e7d32c9aab56b450 /src/table/replication/sharded.rs
parent94f3d287742ff90f179f528421c690b00b71a912 (diff)
downloadgarage-046b649bcc3b147140fc2b0af0e071d3dd1b2c8d.tar.gz
garage-046b649bcc3b147140fc2b0af0e071d3dd1b2c8d.zip
(not well tested) use merkle tree for sync
Diffstat (limited to 'src/table/replication/sharded.rs')
-rw-r--r--src/table/replication/sharded.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/table/replication/sharded.rs b/src/table/replication/sharded.rs
index 42a742cd..886c7c08 100644
--- a/src/table/replication/sharded.rs
+++ b/src/table/replication/sharded.rs
@@ -44,11 +44,13 @@ impl TableReplication for TableShardedReplication {
fn split_points(&self, ring: &Ring) -> Vec<Hash> {
let mut ret = vec![];
- ret.push([0u8; 32].into());
for entry in ring.ring.iter() {
ret.push(entry.location);
}
- ret.push([0xFFu8; 32].into());
+ if ret.len() > 0 {
+ assert_eq!(ret[0], [0u8; 32].into());
+ }
+
ret
}
}