From 16853acf354ea855fbf1aa632304ff58689fba58 Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" Date: Fri, 7 Oct 2022 09:19:34 -0700 Subject: [PATCH] log adding root every 10s (#28280) --- runtime/src/accounts_db.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/runtime/src/accounts_db.rs b/runtime/src/accounts_db.rs index 4331acd441..9f84829bf9 100644 --- a/runtime/src/accounts_db.rs +++ b/runtime/src/accounts_db.rs @@ -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(),