Skip to content

Commit

Permalink
log last_snapshot_storages at the end of the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangzhu70 committed Feb 15, 2023
1 parent 38dda74 commit 5799adf
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions runtime/src/accounts_background_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Vec<Arc<AccountStorageEntry>>>;
let mut last_snapshot_storages: Option<Vec<Arc<AccountStorageEntry>>> = None;
loop {
if exit.load(Ordering::Relaxed) {
break;
Expand Down Expand Up @@ -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)
);
Expand All @@ -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();

Expand Down

0 comments on commit 5799adf

Please sign in to comment.