AcctIdx: avoid overcounting inserts (#20544)
This commit is contained in:
committed by
GitHub
parent
00c6536528
commit
2c3d52b4cc
@ -26,7 +26,7 @@ pub struct BucketMapHolderStats {
|
|||||||
pub keys: AtomicU64,
|
pub keys: AtomicU64,
|
||||||
pub deletes: AtomicU64,
|
pub deletes: AtomicU64,
|
||||||
pub inserts: AtomicU64,
|
pub inserts: AtomicU64,
|
||||||
pub count: AtomicU64,
|
count: AtomicU64,
|
||||||
pub bg_waiting_us: AtomicU64,
|
pub bg_waiting_us: AtomicU64,
|
||||||
pub bg_throttling_wait_us: AtomicU64,
|
pub bg_throttling_wait_us: AtomicU64,
|
||||||
pub count_in_mem: AtomicU64,
|
pub count_in_mem: AtomicU64,
|
||||||
|
@ -348,12 +348,12 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
|||||||
disk_entry
|
disk_entry
|
||||||
} else {
|
} else {
|
||||||
// not on disk, so insert new thing
|
// not on disk, so insert new thing
|
||||||
|
self.stats().insert_or_delete(true, self.bin);
|
||||||
new_value.into()
|
new_value.into()
|
||||||
};
|
};
|
||||||
assert!(new_value.dirty());
|
assert!(new_value.dirty());
|
||||||
vacant.insert(new_value);
|
vacant.insert(new_value);
|
||||||
self.stats().insert_or_delete_mem(true, self.bin);
|
self.stats().insert_or_delete_mem(true, self.bin);
|
||||||
self.stats().insert_or_delete(true, self.bin);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user