mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-10 14:36:51 +00:00
(not well tested) use merkle tree for sync
This commit is contained in:
@@ -53,7 +53,6 @@ impl TableReplication for TableFullReplication {
|
||||
fn split_points(&self, _ring: &Ring) -> Vec<Hash> {
|
||||
let mut ret = vec![];
|
||||
ret.push([0u8; 32].into());
|
||||
ret.push([0xFFu8; 32].into());
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user