Skip to content

Commit

Permalink
Go back to assuming that cache.lru_items and cache.cache_data are in …
Browse files Browse the repository at this point in the history
…sync. Otherwise we have corruption in the cache and, under PyPy, a CFFI-level memory leak; we want tests to fail in that case.
  • Loading branch information
jamadden committed May 20, 2015
1 parent 5d38a08 commit 0012ca0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ZODB/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,10 +1018,9 @@ def _cache_items(self):
items = self._cache.lru_items()
# fine everything. some on the lru list, some not
everything = self._cache.cache_data
# remove those items that are on the lru list (which may not actually
# be in the full cache, under the Python implementation)
# remove those items that are on the lru list
for k,v in items:
everything.pop(k, None)
del everything[k]
# return a list of [ghosts....not recently used.....recently used]
return list(everything.items()) + items

Expand Down

0 comments on commit 0012ca0

Please sign in to comment.