Minor patch

This commit is contained in:
Miroslav Štampar 2026-06-22 00:17:11 +02:00
parent a3fc171665
commit 0b2b3e956f
4 changed files with 69 additions and 4 deletions

View file

@ -172,6 +172,12 @@ class BigArray(list):
except OSError:
pass
# Note: the formerly on-disk chunk is now an in-memory list (and its file has been
# removed), so any cache entry still pointing at it is stale; dropping it prevents
# serving outdated data if that chunk index is later re-dumped (e.g. append after pop)
if isinstance(self.cache, Cache) and self.cache.index == idx:
self.cache = None
return self.chunks[-1].pop()
def index(self, value):