aboutsummaryrefslogtreecommitdiff
path: root/src/table/sync.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-03-11 18:50:32 +0100
committerAlex Auvolat <alex@adnab.me>2021-03-11 18:50:32 +0100
commitfae5104a2cf91206f995b183c5f217ea6729a551 (patch)
treeab68fe686f4880840a872e332d0f09491b2db148 /src/table/sync.rs
parentdb7a9d4948d41e4b641f9c50f6ff8921a436431d (diff)
downloadgarage-fae5104a2cf91206f995b183c5f217ea6729a551.tar.gz
garage-fae5104a2cf91206f995b183c5f217ea6729a551.zip
Add a nice warning
Diffstat (limited to 'src/table/sync.rs')
-rw-r--r--src/table/sync.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/table/sync.rs b/src/table/sync.rs
index 42321ac6..68fc9fcb 100644
--- a/src/table/sync.rs
+++ b/src/table/sync.rs
@@ -433,9 +433,12 @@ where
// We don't request those items from them, they will send them.
// We only bother with pushing items that differ
}
- MerkleNode::Leaf(ik, _) => {
+ MerkleNode::Leaf(ik, ivhash) => {
// Just send that item directly
- if let Some(val) = self.data.store.get(ik)? {
+ if let Some(val) = self.data.store.get(&ik[..])? {
+ if blake2sum(&val[..]) != ivhash {
+ warn!("Hashes differ between stored value and Merkle tree, key: {:?} (if your server is very busy, don't worry, this happens when the Merkle tree can't be updated fast enough)", ik);
+ }
todo_items.push(val.to_vec());
}
}