From d2df8afc834276fd8723ab3f37a3af270bd5d1d2 Mon Sep 17 00:00:00 2001 From: Mark Logan <103447440+mystenmark@users.noreply.github.com> Date: Wed, 7 Feb 2024 20:56:26 -0800 Subject: [PATCH] More state sync logs (#16115) --- crates/sui-network/src/state_sync/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/sui-network/src/state_sync/mod.rs b/crates/sui-network/src/state_sync/mod.rs index dd88d75e369b6..2f0078e6e4e25 100644 --- a/crates/sui-network/src/state_sync/mod.rs +++ b/crates/sui-network/src/state_sync/mod.rs @@ -1273,6 +1273,7 @@ async fn sync_checkpoint_contents( } } +#[instrument(level = "debug", skip_all, fields(sequence_number = ?checkpoint.sequence_number()))] async fn sync_one_checkpoint_contents( network: anemo::Network, store: S, @@ -1283,6 +1284,8 @@ async fn sync_one_checkpoint_contents( where S: WriteStore + Clone, { + debug!("syncing checkpoint contents"); + // Check if we already have produced this checkpoint locally. If so, we don't need // to get it from peers anymore. if store @@ -1291,7 +1294,7 @@ where .sequence_number() >= checkpoint.sequence_number() { - debug!(seq = ?checkpoint.sequence_number(), "checkpoint was already created via consensus output"); + debug!("checkpoint was already created via consensus output"); return Ok(checkpoint); } @@ -1309,6 +1312,7 @@ where .read() .unwrap() .wait_interval_when_no_peer_to_sync_content(); + info!("retrying checkpoint sync after {:?}", duration); tokio::time::sleep(duration).await; return Err(checkpoint); }; @@ -1335,6 +1339,7 @@ where .expect("store operation should not fail") }) { + debug!("store already contains checkpoint contents"); return Some(contents); } @@ -1359,6 +1364,7 @@ where } } } + debug!("no peers had checkpoint contents"); None }