diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-11 18:28:03 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-11 18:28:27 +0100 |
commit | 046b649bcc3b147140fc2b0af0e071d3dd1b2c8d (patch) | |
tree | f23ea651237ffce9f3aca3a2e7d32c9aab56b450 /src/table/replication | |
parent | 94f3d287742ff90f179f528421c690b00b71a912 (diff) | |
download | garage-046b649bcc3b147140fc2b0af0e071d3dd1b2c8d.tar.gz garage-046b649bcc3b147140fc2b0af0e071d3dd1b2c8d.zip |
(not well tested) use merkle tree for sync
Diffstat (limited to 'src/table/replication')
-rw-r--r-- | src/table/replication/fullcopy.rs | 1 | ||||
-rw-r--r-- | src/table/replication/sharded.rs | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/table/replication/fullcopy.rs b/src/table/replication/fullcopy.rs index a62a6c3c..a20f20b7 100644 --- a/src/table/replication/fullcopy.rs +++ b/src/table/replication/fullcopy.rs @@ -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 } } 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 } } |