From 2a73f8d3aafe985fe9f169476961c23946cad1b2 Mon Sep 17 00:00:00 2001 From: Stanislau Hlebik Date: Mon, 26 Oct 2020 04:55:30 -0700 Subject: [PATCH] mononoke: add more debug output to admin rsync Summary: To make it clearer what's going on Reviewed By: krallin Differential Revision: D24534961 fbshipit-source-id: 049edbf1b6b648670a6c6ef68b14698a27ea1a0e --- eden/mononoke/cmds/admin/rsync.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eden/mononoke/cmds/admin/rsync.rs b/eden/mononoke/cmds/admin/rsync.rs index 982d63df4e..f23ee803e4 100644 --- a/eden/mononoke/cmds/admin/rsync.rs +++ b/eden/mononoke/cmds/admin/rsync.rs @@ -22,7 +22,7 @@ use mononoke_types::{ MPath, }; use regex::Regex; -use slog::{info, Logger}; +use slog::{debug, info, Logger}; use std::{collections::BTreeMap, num::NonZeroU64}; use crate::error::SubcommandError; @@ -228,6 +228,13 @@ async fn rsync( let from_path = from_dir.join(&from_suffix); let to_path = to_dir.join(&from_suffix); + debug!( + ctx.logger(), + "from {}, to {}, size: {}", + from_path, + to_path, + fsnode_file.size() + ); let file_change = FileChange::new( *fsnode_file.content_id(), *fsnode_file.file_type(), @@ -238,6 +245,11 @@ async fn rsync( if let Some(lfs_threshold) = limits.lfs_threshold { if fsnode_file.size() < lfs_threshold.get() { total_file_size += fsnode_file.size(); + } else { + debug!( + ctx.logger(), + "size is not accounted because of lfs threshold" + ); } } else { total_file_size += fsnode_file.size();