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
This commit is contained in:
Jeff Washington (jwash) 2021-09-27 13:39:41 -05:00 committed by GitHub
parent e94b7984a1
commit 8266864adc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -175,6 +175,8 @@ impl<T: IndexValue> BucketMapHolder<T> {
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) {