From 5799adfab91e363008f4cc6819f2de295a6f9d3c Mon Sep 17 00:00:00 2001 From: Xiang Zhu Date: Wed, 15 Feb 2023 07:47:51 -0800 Subject: [PATCH] log last_snapshot_storages at the end of the loop --- runtime/src/accounts_background_service.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/runtime/src/accounts_background_service.rs b/runtime/src/accounts_background_service.rs index ee8e31118e8e5a..7b4c101312d2de 100644 --- a/runtime/src/accounts_background_service.rs +++ b/runtime/src/accounts_background_service.rs @@ -548,7 +548,7 @@ impl AccountsBackgroundService { // To support fastboot, we must ensure the storages used in the latest bank snapshot are // not recycled nor removed early. Hold an Arc of their AppendVecs to prevent them from // expiring. - let mut last_snapshot_storages: Option>>; + let mut last_snapshot_storages: Option>> = None; loop { if exit.load(Ordering::Relaxed) { break; @@ -630,7 +630,8 @@ impl AccountsBackgroundService { last_snapshot_storages = Some(snapshot_storages); debug!( "Number of snapshot storages kept alive for fastboot: {}", - &last_snapshot_storages + last_snapshot_storages + .as_ref() .map(|storages| storages.len()) .unwrap_or(0) ); @@ -655,14 +656,12 @@ impl AccountsBackgroundService { stats.record_and_maybe_submit(start_time.elapsed()); sleep(Duration::from_millis(INTERVAL_MS)); } - /* info!( "ABS loop done. Number of snapshot storages kept alive for fastboot: {}", last_snapshot_storages .map(|storages| storages.len()) .unwrap_or(0) ); - */ }) .unwrap();