mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-26 08:18:18 +00:00
chore: refresh erasure codec and rust toolchains (#4795)
This commit is contained in:
@@ -352,7 +352,9 @@ impl MokaBackend {
|
||||
// Moka maintenance is still needed to retire queued removals, but clear
|
||||
// must not rely on lazy invalidation alone: under heavy contention an
|
||||
// entry can remain physically resident (and still counted) even though
|
||||
// the invalidation fence already hides it from lookups.
|
||||
// the invalidation fence already hides it from lookups. Sweep both the
|
||||
// entries visible to iteration and a fallback invalidate_all fence so
|
||||
// delayed internal writes cannot strand a counted entry.
|
||||
for _ in 0..256 {
|
||||
self.cache.run_pending_tasks().await;
|
||||
let lingering_keys: Vec<_> = self.cache.iter().map(|(key, _)| key.as_ref().clone()).collect();
|
||||
@@ -360,6 +362,9 @@ impl MokaBackend {
|
||||
self.cache.remove(&key).await;
|
||||
}
|
||||
|
||||
self.cache.invalidate_all();
|
||||
self.cache.run_pending_tasks().await;
|
||||
|
||||
if self.cache.entry_count() == 0 {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user