diff options
author | Alex Auvolat <alex@adnab.me> | 2021-03-12 15:05:26 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2021-03-12 15:05:26 +0100 |
commit | 8860aa19b867183b83ee48efd9990cd34e567f53 (patch) | |
tree | 78ced8785a61aef80292d05f284c6d15c210fb2d /src/table/merkle.rs | |
parent | 1fea257291bdbf447f9918274ebf73848afb3a0c (diff) | |
download | garage-8860aa19b867183b83ee48efd9990cd34e567f53.tar.gz garage-8860aa19b867183b83ee48efd9990cd34e567f53.zip |
Make syncer have its own rpc client/server
Diffstat (limited to 'src/table/merkle.rs')
-rw-r--r-- | src/table/merkle.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/table/merkle.rs b/src/table/merkle.rs index a694c9e9..a164df04 100644 --- a/src/table/merkle.rs +++ b/src/table/merkle.rs @@ -109,11 +109,17 @@ impl MerkleUpdater { match x { Ok((key, valhash)) => { if let Err(e) = self.update_item(&key[..], &valhash[..]) { - warn!("({}) Error while updating Merkle tree item: {}", self.table_name, e); + warn!( + "({}) Error while updating Merkle tree item: {}", + self.table_name, e + ); } } Err(e) => { - warn!("({}) Error while iterating on Merkle todo tree: {}", self.table_name, e); + warn!( + "({}) Error while iterating on Merkle todo tree: {}", + self.table_name, e + ); tokio::time::delay_for(Duration::from_secs(10)).await; } } @@ -154,8 +160,7 @@ impl MerkleUpdater { if !deleted { debug!( "({}) Item not deleted from Merkle todo because it changed: {:?}", - self.table_name, - k + self.table_name, k ); } Ok(()) @@ -196,7 +201,10 @@ impl MerkleUpdater { if children.len() == 0 { // should not happen - warn!("({}) Replacing intermediate node with empty node, should not happen.", self.table_name); + warn!( + "({}) Replacing intermediate node with empty node, should not happen.", + self.table_name + ); Some(MerkleNode::Empty) } else if children.len() == 1 { // We now have a single node (case when the update deleted one of only two |