Closed javiergonzalezGenially closed 2 years ago
I can confirm this bug.
Ahh, yes, because delete changes the linked list order. Good catch and root cause. Will fix shortly.
fixed on 7.4.3 by accident, on 7.4.4 on purpose 😬
backported to other 7.x versions
im not able to get my head around why infinite loop leads to infinite getpid syscalls as shown https://github.com/nodejs/node/issues/42277 . any ideas?
@palashkulsh Idk, you'd have to ask them. LRUCache doesn't do any getpid() calls.
We found out that since we updated to v7 sometimes lru-cache would get stuck inside the purgeStale function
(lame) test
you will see it gets stuck in purge start
The solution seems to be to make the purgeStale function "cache" the items to delete and delete it after the rindexes iteration, or else it may get stuck in an infinite iteration