AcctIdx: add age per item in in_mem acct idx (#19981)
This commit is contained in:
parent
8df8f4396d
commit
bed0049a51
|
@ -25,7 +25,7 @@ use std::{
|
||||||
},
|
},
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
sync::{
|
sync::{
|
||||||
atomic::{AtomicBool, AtomicU64, Ordering},
|
atomic::{AtomicBool, AtomicU64, AtomicU8, Ordering},
|
||||||
Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
Arc, Mutex, RwLock, RwLockReadGuard, RwLockWriteGuard,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -127,12 +127,14 @@ impl AccountSecondaryIndexes {
|
||||||
#[derive(Debug, Default)]
|
#[derive(Debug, Default)]
|
||||||
pub struct AccountMapEntryMeta {
|
pub struct AccountMapEntryMeta {
|
||||||
pub dirty: AtomicBool,
|
pub dirty: AtomicBool,
|
||||||
|
pub age: AtomicU8,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl AccountMapEntryMeta {
|
impl AccountMapEntryMeta {
|
||||||
pub fn new_dirty() -> Self {
|
pub fn new_dirty() -> Self {
|
||||||
AccountMapEntryMeta {
|
AccountMapEntryMeta {
|
||||||
dirty: AtomicBool::new(true),
|
dirty: AtomicBool::new(true),
|
||||||
|
age: AtomicU8::default(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue