AcctIdx: when stop_flush is disabled, prepare to age (#20113)
This commit is contained in:
parent
038d77347a
commit
fb55e9a9b6
|
@ -502,9 +502,10 @@ impl<T: IndexValue> InMemAccountsIndex<T> {
|
||||||
|
|
||||||
fn start_stop_flush(&self, stop: bool) {
|
fn start_stop_flush(&self, stop: bool) {
|
||||||
if stop {
|
if stop {
|
||||||
self.stop_flush.fetch_add(1, Ordering::Acquire);
|
self.stop_flush.fetch_add(1, Ordering::Release);
|
||||||
} else {
|
} else if 1 == self.stop_flush.fetch_sub(1, Ordering::Release) {
|
||||||
self.stop_flush.fetch_sub(1, Ordering::Release);
|
// stop_flush went to 0, so this bucket could now be ready to be aged
|
||||||
|
self.storage.wait_dirty_or_aged.notify_one();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue