Files
api/packages
Andrew Carpenter 61232db257 fix(rpc-provider): repair LRU list corruption when the tail entry is retrieved (#6270)
A get() hit on the entry currently at the internal list tail ran the
generic unlink in #toHead without retargeting #tail, leaving #tail
pointing at the node just moved to the head. From that point
keys()/entries() truncate, capacity eviction removes the most-recently-
used entry instead of the least, and the maps and the list diverge:
entries whose nodes have fallen off the walkable list can never become
the tail, so neither capacity nor TTL eviction can ever remove them,
while nodes for already-evicted keys stay pinned through the stale
next/prev chains of retained nodes. Both populations accumulate for
the lifetime of the provider, pinning their (potentially large)
stringified-params keys.

#toHead now handles the tail case explicitly: retarget #tail to
ref.prev and close the list behind the moved node, never dereferencing
the tail's own next pointer (which is not guaranteed valid - the first
node inserted keeps its constructor self-referential pointers).
2026-07-21 16:07:26 -04:00
..
2026-07-19 02:00:38 +00:00
2026-07-19 02:00:38 +00:00
2026-07-19 02:00:38 +00:00
2026-07-19 02:00:38 +00:00
2026-07-19 02:00:38 +00:00
2026-07-19 02:00:38 +00:00