From 8266864adc2b26f33c94ea71d9cfa93872b1cd6a Mon Sep 17 00:00:00 2001 From: "Jeff Washington (jwash)" <75863576+jeffwashington@users.noreply.github.com> Date: Mon, 27 Sep 2021 13:39:41 -0500 Subject: [PATCH] AcctIdx: maybe advance age when a bg thread wakes up (#20250) * fix math error with stats calc * AcctIdx: maybe report stats when a bg thread wakes up --- runtime/src/bucket_map_holder.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/src/bucket_map_holder.rs b/runtime/src/bucket_map_holder.rs index 408b8571775c32..19e8a80047091a 100644 --- a/runtime/src/bucket_map_holder.rs +++ b/runtime/src/bucket_map_holder.rs @@ -175,6 +175,8 @@ impl BucketMapHolder { self.stats .bg_waiting_us .fetch_add(m.as_us(), Ordering::Relaxed); + // likely some time has elapsed. May have been waiting for age time interval to elapse. + self.maybe_advance_age(); } if exit.load(Ordering::Relaxed) {