Skip to content

Commit

Permalink
add index stat accounts_not_found_in_index (#2686)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington authored Aug 22, 2024
1 parent ff87ed9 commit e429384
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2030,6 +2030,7 @@ pub struct ShrinkStats {
alive_accounts: AtomicU64,
accounts_loaded: AtomicU64,
purged_zero_lamports: AtomicU64,
accounts_not_found_in_index: AtomicU64,
}

impl ShrinkStats {
Expand Down Expand Up @@ -2133,6 +2134,11 @@ impl ShrinkStats {
self.purged_zero_lamports.swap(0, Ordering::Relaxed),
i64
),
(
"accounts_not_found_in_index",
self.accounts_not_found_in_index.swap(0, Ordering::Relaxed),
i64
),
);
}
}
Expand Down Expand Up @@ -2340,6 +2346,13 @@ impl ShrinkAncientStats {
.swap(0, Ordering::Relaxed),
i64
),
(
"accounts_not_found_in_index",
self.shrink_stats
.accounts_not_found_in_index
.swap(0, Ordering::Relaxed),
i64
),
);
}
}
Expand Down Expand Up @@ -3928,6 +3941,10 @@ impl AccountsDb {
alive_accounts.add(ref_count, stored_account, slot_list);
alive += 1;
}
} else {
stats
.accounts_not_found_in_index
.fetch_add(1, Ordering::Relaxed);
}
index += 1;
result
Expand Down

0 comments on commit e429384

Please sign in to comment.