log adding root every 10s (#28280)

This commit is contained in:
Jeff Washington (jwash) 2022-10-07 09:19:34 -07:00 committed by GitHub
parent a1fe8dd444
commit 16853acf35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -1193,6 +1193,8 @@ pub struct AccountsDb {
/// debug feature to scan every append vec and verify refcounts are equal
exhaustively_verify_refcounts: bool,
last_add_root_log: AtomicInterval,
/// the full accounts hash calculation as of a predetermined block height 'N'
/// to be included in the bank hash at a predetermined block height 'M'
/// The cadence is once per epoch, all nodes calculate a full accounts hash as of a known slot calculated using 'N'
@ -2175,6 +2177,7 @@ impl AccountsDb {
num_hash_scan_passes,
log_dead_slots: AtomicBool::new(true),
exhaustively_verify_refcounts: false,
last_add_root_log: AtomicInterval::default(),
epoch_accounts_hash_manager: EpochAccountsHashManager::new_invalid(),
}
}
@ -8509,6 +8512,10 @@ impl AccountsDb {
}
store_time.stop();
if self.last_add_root_log.should_update(10_000) {
datapoint_info!("add_root", ("root", slot, i64));
}
AccountsAddRootTiming {
index_us: index_time.as_us(),
cache_us: cache_time.as_us(),