Skip to content

Commit

Permalink
add index stat accounts_not_found_in_index (solana-labs#2686)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwashington committed Aug 27, 2024
1 parent 50bf10c commit 4656912
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 @@ -2028,6 +2028,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 @@ -2131,6 +2132,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 @@ -2338,6 +2344,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 @@ -3923,6 +3936,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 4656912

Please sign in to comment.