Issue reported in internal product where in some rare circumstances the LRU code throws a KeyError when evicting an element from the cache store.
The exact scenario is unknown, one hypothesis is that there is a threading problem where the LRU uses an async lock which is bypassed by accessing the store in a different thread.
The fix for now is just using pop instead of del to not cause a crash if the deletion fails.
Implementation Description
Any new dependencies Introduced
How Has This Been Tested?
Existing cache store tests passing
PR Checklist:
[x] I have implemented all requirements? (see JIRA, project documentation).
[x] I am not affecting someone else's work, If I am, they are included as a reviewer.
[x] I have added relevant tests (unit, integration or regression).
[ ] I have added comments to all the bits that are hard to follow.
[ ] I have added/updated Documentation.
[ ] I have updated the appropriate changelog with a line for my changes.
Motivation and Context
Issue reported in internal product where in some rare circumstances the LRU code throws a KeyError when evicting an element from the cache store. The exact scenario is unknown, one hypothesis is that there is a threading problem where the LRU uses an async lock which is bypassed by accessing the store in a different thread.
The fix for now is just using
pop
instead ofdel
to not cause a crash if the deletion fails.Implementation Description
Any new dependencies Introduced
How Has This Been Tested?
Existing cache store tests passing
PR Checklist:
Screenshots (if appropriate):