aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-19 19:38:45 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-19 19:38:45 +0000
commita54f3158f12cbc69107b0a65af6c2e56fda5b2d7 (patch)
tree2484458583f4171e625e2938976ff85d44768d52 /src
parentea75564851851b969ef23797537c813ba607b84a (diff)
downloadgarage-a54f3158f12cbc69107b0a65af6c2e56fda5b2d7.tar.gz
garage-a54f3158f12cbc69107b0a65af6c2e56fda5b2d7.zip
Less output
Diffstat (limited to 'src')
-rw-r--r--src/table_sync.rs32
1 files changed, 18 insertions, 14 deletions
diff --git a/src/table_sync.rs b/src/table_sync.rs
index 6f45969b..e394ba0d 100644
--- a/src/table_sync.rs
+++ b/src/table_sync.rs
@@ -433,13 +433,15 @@ where
if let TableRPC::<F>::SyncRPC(SyncRPC::Difference(mut diff_ranges, diff_items)) =
rpc_resp
{
- eprintln!(
- "({}) Sync with {:?}: difference {} ranges, {} items",
- self.table.name,
- who,
- diff_ranges.len(),
- diff_items.len()
- );
+ if diff_ranges.len() > 0 || diff_items.len() > 0 {
+ eprintln!(
+ "({}) Sync with {:?}: difference {} ranges, {} items",
+ self.table.name,
+ who,
+ diff_ranges.len(),
+ diff_items.len()
+ );
+ }
let mut items_to_send = vec![];
for differing in diff_ranges.drain(..) {
if differing.level == 0 {
@@ -583,13 +585,15 @@ where
.iter()
.map(|x| x.children.len())
.fold(0, |x, y| x + y);
- eprintln!(
- "({}) Checksum comparison RPC: {} different + {} items for {} received",
- self.table.name,
- ret_ranges.len(),
- ret_items.len(),
- n_checksums
- );
+ if ret_ranges.len() > 0 || ret_items.len() > 0 {
+ eprintln!(
+ "({}) Checksum comparison RPC: {} different + {} items for {} received",
+ self.table.name,
+ ret_ranges.len(),
+ ret_items.len(),
+ n_checksums
+ );
+ }
Ok(SyncRPC::Difference(ret_ranges, ret_items))
}