wip: throttle correctly (#30547)

throttle correctly
This commit is contained in:
Jeff Washington (jwash) 2023-03-01 19:08:46 -06:00 committed by GitHub
parent a3e4c96bc0
commit 590ee58667
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,8 @@ impl BucketMapHolderStats {
pub fn get_remaining_items_to_flush_estimate(&self) -> usize {
let in_mem = self.count_in_mem.load(Ordering::Relaxed) as u64;
let held_in_mem = self.held_in_mem_slot_list_cached.load(Ordering::Relaxed)
+ self.held_in_mem_slot_list_len.load(Ordering::Relaxed);
+ self.held_in_mem_slot_list_len.load(Ordering::Relaxed)
+ self.held_in_mem_ref_count.load(Ordering::Relaxed);
in_mem.saturating_sub(held_in_mem) as usize
}