(cherry picked from commit e5225b7e68
)
Co-authored-by: sakridge <sakridge@gmail.com>
This commit is contained in:
@ -4629,7 +4629,7 @@ impl AccountsDB {
|
||||
roots.sort();
|
||||
info!("{}: accounts_index roots: {:?}", label, roots,);
|
||||
for (pubkey, account_entry) in self.accounts_index.account_maps.read().unwrap().iter() {
|
||||
info!(" key: {}", pubkey);
|
||||
info!(" key: {} ref_count: {}", pubkey, account_entry.ref_count(),);
|
||||
info!(
|
||||
" slots: {:?}",
|
||||
*account_entry.slot_list.read().unwrap()
|
||||
|
@ -78,6 +78,12 @@ pub struct AccountMapEntryInner<T> {
|
||||
pub slot_list: RwLock<SlotList<T>>,
|
||||
}
|
||||
|
||||
impl<T> AccountMapEntryInner<T> {
|
||||
pub fn ref_count(&self) -> u64 {
|
||||
self.ref_count.load(Ordering::Relaxed)
|
||||
}
|
||||
}
|
||||
|
||||
#[self_referencing]
|
||||
pub struct ReadAccountMapEntry<T: 'static> {
|
||||
owned_entry: AccountMapEntry<T>,
|
||||
|
Reference in New Issue
Block a user