DiskIdx: new items are not dirty by default (#23123)
This commit is contained in:
parent
a14c7c37ee
commit
017170c99d
|
@ -203,6 +203,12 @@ impl AccountMapEntryMeta {
|
|||
age: AtomicU8::new(storage.future_age_to_flush()),
|
||||
}
|
||||
}
|
||||
pub fn new_clean<T: IndexValue>(storage: &Arc<BucketMapHolder<T>>) -> Self {
|
||||
AccountMapEntryMeta {
|
||||
dirty: AtomicBool::new(false),
|
||||
age: AtomicU8::new(storage.future_age_to_flush()),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
|
|
|
@ -506,7 +506,7 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||
Arc::new(AccountMapEntryInner::new(
|
||||
slot_list,
|
||||
ref_count,
|
||||
AccountMapEntryMeta::new_dirty(&self.storage),
|
||||
AccountMapEntryMeta::new_clean(&self.storage),
|
||||
))
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue