chore: refresh erasure codec and rust toolchains (#4795)

This commit is contained in:
houseme
2026-07-13 20:16:25 +08:00
committed by GitHub
parent 7ece747eab
commit 0ac7f0d0cf
5 changed files with 11 additions and 6 deletions
+6 -1
View File
@@ -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;
}